- Home /
Update and Fixed update function synchronicity
I have a question about the Update and Fixed Update cycles in my scripts. If I have update functions in multiple scripts attached on different objects, how do I know in which order these cycles are executed. I may have some logic in an updated function which depends on the result of calculations in other update cycle on a different object. Is this creating a race condition?
If there is a hierarchy of execution of these functions, how do I access this queue to make sure everything is happening in the desired order?
I am asking this because I can see some random bugs that are difficult to reproduce and I fear they could derive from unstable timing as described above.
Answer by moltow · Jul 28, 2017 at 10:54 PM
Generally, there isn't a concrete answer for out of the box operation, but you can go to the menu: Edit->Project Settings->Script Execution Order. There you can specify which of your scripts you want to execute sooner/later, etc.
Your answer
Follow this Question
Related Questions
Why Do Inputs Have to Been in Update (Rather than FixedUpdate)? 3 Answers
Fixed Update Problems C# - Please help! 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C# Custom (slower) Update function? 5 Answers