Example #1
0
    // Start is called before the first frame update
    private void Awake()
    {
        Instance = this;

        DontDestroyCamera();
        DontDestroyMusic();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        DontDestroyOnLoad(gameObject);

        if (musicaInstance == null)
        {
            musicaInstance = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }