/// <summary>
 ///
 /// </summary>
 protected virtual void OnEnable()
 {
     if ((GetComponent <Collider>() != null) && !Instances.ContainsValue(this))
     {
         Instances.Add(GetComponent <Collider>(), this);
     }
 }
Beispiel #2
0
    /// <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);
        }
    }