Exemplo n.º 1
0
    public void ClearSoundClipResource()
    {
        foreach (string name in _dictionarySoundClip.Keys)
        {
            SoundClip soundClip = _dictionarySoundClip[name];

            if (soundClip.HasLoaded)
            {
                Resources.UnloadAsset(soundClip.Clip);
                soundClip.ClearClip();
            }
        }

        for (int i = 0; i < _sfxChannelsNumber; i++)
        {
            _sfxChannel[i].clip = null;
        }
    }