Events vs variable check perfomance

7Dev

New member
If I'm trying to track an externally controlled state of a character is it better to send an event to the behavior tree or for the behavior tree to use a conditional to keep track of the state changes?
 
At that level you aren't going to notice a difference in performance. In cases like this it's recommended that you do what makes the most sense for your game logic. As always though I recommend profiling and then optimizing the area that has the largest bottleneck.
 
Top