Search Unity

When is World.CreateManager() Safe to Call

Discussion in 'Entity Component System' started by orionburcham, Jan 28, 2019.

  1. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    488
    Is it valid to call
    World.CreateManager<T>()
    after Unity has finished building the player loop?

    For example, if I call CreateManager() from a System's OnUpdate() function (terrible idea, but just as an example), will it create that system instance, add it to the player loop, and respect it's [Update...] Attributes for execution order?

    Thanks for any info!
     
    Last edited: Jan 28, 2019
  2. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    488
    xVergilx and 5argon like this.