Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

ISystemStartStop.OnStartRunning

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void OnStartRunning(ref SystemState state);

Parameters

Parameter Description
state The SystemState backing this system instance

Description

Called before the first call to OnUpdate and when a system resumes updating after being stopped or disabled.

If the EntityQuery objects defined for a system do not match any existing entities then the system skips updates until a successful match is found. Likewise, if you set SystemState.Enabled to false, then the system stops running. In both cases, ISystemStartStop.OnStopRunning is called when a running system stops updating; OnStartRunning is called when it starts updating again.