Exemplo n.º 1
0
 public virtual void OnDisable()
 {
     if (UsesUpdate())
     {
         PooledUnityCalls.RemoveUpdate(this);
     }
 }
Exemplo n.º 2
0
 public virtual void OnEnable()
 {
     if (UsesUpdate())
     {
         PooledUnityCalls.AddUpdate(this);
     }
 }
    private void Awake()
    {
        if (instance != null)
        {
            Debug.LogError("Multiple instances of singleton! Destroying offending component.");
            Destroy(this);
            return;
        }

        instance = this;
    }