0
\$\begingroup\$

In script execution order , i set A start first before B , and B start first before C .

So normally the script execution order should be A -> B -> C

C is already loaded on scene 1 without the help of other script .

B will be added by C on scene 1 and A will be added by B on scene 2 , and C will be added again by A on scene 2.

The gameobject in which B is attached won't be destroyed when changing scene , or in simple term , DontDestroyOnLoad() .

When Scene 1 loaded , C will load B , B will request scene change , which mean C will be destroyed afterward .After scene change , B will load A , then A will load C . B will request Application.Quit after 50 frame since it's loaded.

So if player start from scene 1 , is the script execution order has changed ? and how is script execution order from start until Application.Quit ? Please explain with details this problem almost made me lose my brian clels .

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This seems like something you can answer for yourself by adding something like void Start() { Debug.LogFormat("Script {0} is starting at time {1}", "A", Time.time); } to each of your scripts, then looking at the order of the outputs in the console log. Is the order you observe different from what you expect? If so, please show us a Minimal Complete Verifiable Example. \$\endgroup\$ Commented Apr 24, 2020 at 14:26
  • \$\begingroup\$ If you've solved your problem, would you like to post your findings/solution as an Answer below? \$\endgroup\$ Commented May 12, 2020 at 6:56

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.