0
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\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, 2018 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\$ Dec 4, 2018 at 10:07

1 Answer 1

1
\$\begingroup\$

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

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .