Recently, I've been in the process of removing the GameObject-related components from the behavior tree code. While reviewing the code, Rider detected several minor issues, including some related to performance. Could you please install Rider and inspect these issues? I've listed some of them below.
1. The main camera should use the cached one
2. use dict.TryGetValue("DetachedTasks", out var value) for it to avoid to query the dict twice.

1. The main camera should use the cached one

2. use dict.TryGetValue("DetachedTasks", out var value) for it to avoid to query the dict twice.
