Skip to content

Execution order example is false in Readme #76

@EmirSpyke

Description

@EmirSpyke

Hello, execution order example has a false comment, it says that AstroidManager gets Initialized earlier but it not true because its execution order is bigger than GameController, also in the example project this code is almost identical, only difference is that -10 and -20 are swapped which makes the comment true in the example game1, I am posting the method in the Readme:

void InitExecutionOrder()
{
    // In many cases you don't need to worry about execution order,
    // however sometimes it can be important
    // If for example we wanted to ensure that AsteroidManager.Initialize
    // always gets called before GameController.Initialize (and similarly for Tick)
    // Then we could do the following:
    Container.BindExecutionOrder<AsteroidManager>(-10);//This should be -20
    Container.BindExecutionOrder<GameController>(-20);//This should be -10

    // Note that they will be disposed of in the reverse order given here
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions