/// <summary> /// Destruction. /// </summary> protected void OnDestroy() { // Clear default reference if (Default == this) { Default = null; } }
/// <summary> /// Initialization. /// </summary> protected void Awake() { if (setAsDefault) { Default = this; } if (dontDestroyOnLoad) { DontDestroyOnLoad(gameObject); } Blackboard = new DataBlackboard(); }