Method OnEnable
OnEnable()
Called when the attached [GameObject] becomes enabled and active. [GameObject]: https://docs.unity.cn/Manual/GameObjects.html
Declaration
protected virtual void OnEnable()
Remarks
This function initializes the Agent instance, if it hasn't been initialized yet.
Always call the base Agent class version of this function if you implement OnEnable()
in your own Agent subclasses.
Examples
protected override void OnEnable()
{
base.OnEnable();
// additional OnEnable logic...
}