Method OnDisable
OnDisable()
Called when the attached [GameObject] becomes disabled and inactive. [GameObject]: https://docs.unity.cn/Manual/GameObjects.html
Declaration
protected virtual void OnDisable()
Remarks
Always call the base Agent class version of this function if you implement OnDisable()
in your own Agent subclasses.
Examples
protected override void OnDisable()
{
base.OnDisable();
// additional OnDisable logic...
}
See Also
OnEnable ()