Method OnDisable
OnDisable()
Unity calls this automatically when the evaluator becomes disabled. Use this method for any code cleanup. This is also called when the evaluator is disposed or when its filter is destroyed or disabled.
Declaration
protected override void OnDisable()
Overrides
Remarks
When scripts are reloaded after compilation has finished, OnDisable will be called, followed by OnEnable
after the evaluator has been loaded.
OnDisable will only be called if a call to OnEnable() happened before.