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

ComponentSystemBase.OnStopRunning

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

protected void OnStopRunning();

Description

Called when this system stops running because no entities match the system's EntityQuery objects or because you change the system ComponentSystemBase.Enabled property to false.

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