コード例 #1
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(this);
        }

        audioSettings = GameManager.Instance.gameSettings.audioSettings;
        onSoundEvent.AddListener(PlaySoundEffect);
        onTrackEvent.AddListener(PlayBackgroundTrack);
    }