I am seeing a very Major per frame performance hit in BehaviorManager::ResetValue() when BehaviorManager is ticking

derrick.levy

New member
image.png

here is a snapshot of my profile. I have 23 characters that are running a BehaviorTree. My BehaviorTree Manager is set to Tick manually, and it is currently ticking every frame. Any thoughts on my this call is so expensive? 10 ms is more than have my entire frame budget
 
ResetValue uses reflection to get/set the value and unfortunately there's not a generic way around that. In your case I would create a new task which explicitly resets the variables before the tree has completed. You could also subscribe to the OnBehaviorEnd event and reset it using your own component.
 
Top