Is that me or select node is not branching the inputs but executing all them at once every time?
If I replace this to switch or branch - it will stop spamming this warning.
I mean this is something that everyone should know about this node. Because if there will be some complicated calculations (lets say 5-6 branches) instead of just one it will do all of them despite the condition. Which may seriously hurt your perfomance.
Not sure what you’re getting at here, it’s not saying “Hey, I tried to divide by zero.” What it’s saying is “Hey, warning, there’s a Divide By Zero and that can cause a logic crash.”
Can you show what you mean by “If I replace it with a switch or a branch”? It’s likely that a select node has to have reference to every input as unlike a switch or branch it does not have an execution line due to it being a pure operation.
if you are not in PIE the construction script runs many times any time you do anything with the actor in the level. Like if you move it the construction script will fire a bunch.
If you have it called from begin play and enter PIE it will only run once and the output associated with the index will be processed.
Exactly! And I mean this is logical since they are parameters for a pure function.
You just subconsciously perceive it as an analogue of “case” from C++ but in reality “case” is “switch” node, not “select” node.
“Select” node is a pure function with multiple parameters.
So it will evaluate all of the inputs before picking the answer.
So everyone should be aware about that and never hook any complicated math to this node.