If a script is called at a specific moment in the script execution order, will every LateUpdate() functions from the rest of the objects work after that Update()? The documentation isn´t clear about it.

  • \$\begingroup\$ Try putting in a debug log with a timestamp or incrementing iteration number and you can directly test the order in which the methods are called, no Internet hearsay required. ;) \$\endgroup\$ – DMGregory Dec 4 '18 at 4:33
  • \$\begingroup\$ @DMGregory To be fair, some game engine might be using race conditions, with a logic like "On a single object, Update is called first, then LateUpdate, but it's undefined when they are called compared to other objects", which would give some implementation-specific data with logging, which might not be consistent. \$\endgroup\$ – TomTsagk Dec 4 '18 at 10:07

Execution order effects only scripts initialization, not the main loop methods like Update or LateUpdate.

Awake is called right after construction, Start before first Update. Use these methods to resolve dependencies between components.

Execution order of Event functions


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.