Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question A function that will be called after all Start()-s did

Discussion in 'Scripting' started by LudwigVonChesterfield, Aug 19, 2020.

  1. LudwigVonChesterfield


    May 13, 2020
    I have a seperate scheduler loop that should only start processing after all objects are initialized(started).

    Are there any options to do this, except a one-time-call of that function from Update/FixedUpdate(since those are called after all Starts did)?
  2. Yoreki


    Apr 10, 2019
    Start gets called after all Awake's have been called. So you may want to do it like that. One other way, as you mentioned, is to do a one-time function call from Update, as Update will be run after all Start's finished.
    You could also have a "LastStartCall" script attached to an empty game object and increase its index in the execution order such that it will be executed last. This Start would then be called after all other Start's.