Replies: 1 comment 1 reply
-
Did you observe a decrease in performance? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was very happy when saw AnimationNodeTransition can now have more than 32 Inputs.
But when I see switch - "transition_request" String type - I was very upset.
Old version AnimationNodeTransition switch by "current" Int type.
It was good - just write Inputs array cell number there - and everything is in order - there is no senseless performance loss here.
But if switch have String type, godot in a loop will iterate over the cells and check transition_request==Inputs[i].name to find the int cell number
why performance is thrown down the drain? When possible don't force godot iterate Inputs[], but simply set cell through int variable.
In my project will be long AnimationNodeTransition.(they are not yet completely filled, but will be) Switching in Transition can happen quite often. And if there are many characters on the map. these iterations in the loop can eat a significant share of performance.

Beta Was this translation helpful? Give feedback.
All reactions