Ejemplo n.º 1
0
    // Start is called before the first frame update

    private void Awake()
    {
        if (instance != null && instance != this)
        {
            gameObject.SetActive(false);
        }
        else
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update

    private void Awake()
    {
        instance = this;
        DontDestroyOnLoad(gameObject);
    }