private void Awake()
    {
        if (instance != null)
        {
            Destroy(this);
        }

        instance = this;
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     instance = this;
 }