Unity全局音量控制

 bool ison = false;
    public void ProgramMute()
    {
        if (ison==false)
        {
            AudioListener.volume = 0;
            ison = true;
        }
        else
        {
            AudioListener.volume = 1;
            ison = false;
        }
    }

你可能感兴趣的:(Unity,unity3d,unity)