Exemplo n.º 1
0
    private void OnDestroy()
    {
        if (instance != this)
        {
            return;
        }

        if (system == null)
        {
            return;
        }

        int n = 0, m = 0;

        Memory.GetStats(out n, out m);
        FmodAudioManager.Release();
        //DOAll(fam => fam.Release());
        FmodSoundCreater.ReleaseInstance();
        system.close();
        system.release();
        system = null;
        Memory.GetStats(out n, out m);
        if (n > 0)
        {
            Debug.LogError("FmodAudioSystem Memory Leak:Current  " + n + " Maximum " + m);
        }
    }
Exemplo n.º 2
0
    public void InitSounds()
    {
        FmodSoundCreater fsc = FmodSoundCreater.instance;

        //通用
        fsc.InitSound("SE/Coin", ref coin);
    }