public enum WorldState
Specifies the state of a World.
Name | Value | Description |
---|---|---|
Uninitialized | 0 | The initial state of the World, before it has been initialized by a component manager. If creating the world via one of the component manager's create world methods, the world will never be in this state, since the component manager automatically initializes the world when it is created. |
Sleeping | 1 |
The state of the World after Initialization, while the World has no registered users
and/or cell user request.
Once the world exits the Sleeping state, it will only enter it again if certain conditions
are met (as determined
by its World Sleep Mode).
Note that even if a World is sleeping, it still may have loaded World Cells. |
WaitingForInput | 2 | Standard phase when the World is waiting for input (either in the form of manual input from the user that triggers a secondary operation, or in user add/remove request and/or Origin Cell update which triggers a world update). |
PerformingSecondaryOperation | 3 |
Indiciates the World is currently performing a secondary operation, such as a Group
Name change or clamping operation.
Becuase secondary operations can result in asset changes or modifications to World Cell data, this Phase and all phases after should be considered as part of the World Update cycle. |
ProcessingRequest | 4 | The World enters this state when it has received cell user add and/or remove request. In this state, duplicate and/or offsetting request are removed. |
AwaitingUsers | 5 | After processing user requests, if the World is determined to need an Origin Cell Change, all World Users will be queried to make sure they are ready for the change. If at least one user is not ready, the World yields for a frame and then checks all users again, repeating the cycle until all users are ready. During this cycle, the World will be in this state. If all users are ready the first time they are queried, this Phase is skipped. |
UpdatingGroupingsWithoutOriginCellChange | 6 | The World enters this state after processing a batch of cell user add/remove request, when at least one request survives the processing phase, and an Origin Cell change IS NOT NEEDED. During this state, World Cells are added and removed from Groupings as needed. |
UpdatingGroupingsWithOriginCellChange | 7 | The World enters this state after processing a batch of cell user add/remove request, when at least one request survives the processing phase, and an origin reset IS NEEDED. In this state, World Cells are removed/added from each World Grouping as needed while the origin reset is simultaneously processed. During this state any Active Grids registered with the World are notified so they can enter a 'busy' state until the shift is complete. |
NotifyingUsersThatOriginCellChangeWasCompleted | 8 | The World enters this state after completing Grouping Updates that contained an Origin Cell Change. In this state, all World Users are notified that the Origin Cell change was completed. |
InvokingCallbacks | 9 | After Grouping Updates (or after cell user additions/removals have been processed and no Grouping Updates were needed) the World invokes user fulfilled callbacks for any callbacks that were added before cell user processing finished. Because all callbacks are invoked in a single frame, the World is only in this state for a single frame while the callbacks are being invoked. As such, this state is intended to only be queried by the callback methods themselves. It also ensures that if the callback methods add additional user fullfilled callbacks, they are added to the next world update's callback list. |