public virtual void OnDisable() { // ScriptableObjects' OnDisable() methods are called when scripts are done // recompiling (which happens when you save code, go back to the editor, and wait). // Then, an OnEnable call is made. // This makes OnDisable a good cleanup method for Scriptable Objects. And you can use // OnEnable as a sort of initialization method. // Debug.Log(this.name + " removing all listeners!"); Used.RemoveAllListeners(); }