Closed Qriva closed 3 years ago
Method GetStack() creates new array every time it's called. Array should be pre-allocated and filled with elements instead. StoreBTState can be renamed to something like GetTreeSnapshot or ObtainTreeSnapshot.
GetStack()
https://github.com/Qriva/MonoBehaviourTree/blob/76dce2d5afbcf354626432c05ef3a1ae23f3d35f/Assets/MonoBehaviourTree/Source/Runtime/Nodes/Decorator.cs#L56
Method
GetStack()
creates new array every time it's called. Array should be pre-allocated and filled with elements instead. StoreBTState can be renamed to something like GetTreeSnapshot or ObtainTreeSnapshot.https://github.com/Qriva/MonoBehaviourTree/blob/76dce2d5afbcf354626432c05ef3a1ae23f3d35f/Assets/MonoBehaviourTree/Source/Runtime/Nodes/Decorator.cs#L56