Answer the question
In order to leave comments, you need to log in
How heavy is the processor load of checking the if statement?
I do not really understand what is in the script and how much it can load the processor. Those. what is better to constantly get the value of a variable from another script using GetComponet (in the FixedUpdate function) or put it into a condition to put it in a repeating time frame. Does it cost the processor that I assign a value to a variable that it already has (in the FixedUpdate function). If so, will the load be reduced when inserting this variable into an if, so that the value is assigned to the variable only if it is not already equal to it.
Answer the question
In order to leave comments, you need to log in
The if itself does not load, but your check before assignment will be performed for some time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question