/// <summary> /// /// </summary> protected virtual void OnEnable() { if ((GetComponent <Collider>() != null) && !Instances.ContainsValue(this)) { Instances.Add(GetComponent <Collider>(), this); } }
/// <summary> /// /// </summary> protected virtual void OnEnable() { #if UNITY_5_4_OR_NEWER SceneManager.sceneLoaded += OnLevelLoad; #endif if ((Collider != null) && !Instances.ContainsValue(this)) { Instances.Add(Collider, this); } }