简体   繁体   English

如何在Unity 3D中使音频静音?

[英]How do I Mute The Audio In Unity 3D?

with script this. 用这个脚本。 what is wrong in script this ? 这个脚本有什么问题?

audio.mute = ToggleButton.isSpeakerOff; audio.mute = ToggleButton.isSpeakerOff;

sorry bad english,fast answer please correct my script please 对不起,英语不好,请快速回答我的脚本。

Simply google it, the following is from: http://answers.unity3d.com/questions/52109/how-do-i-mute-all-audio-sound.html 只需在Google上对其进行搜索,即可找到以下内容: http : //answers.unity3d.com/questions/52109/how-do-i-mute-all-audio-sound.html

AudioListener.pause = true; AudioListener.pause = true;

AudioListener.volume = 0; AudioListener.volume = 0;

try this http://unity3d.com/support/documentation/ScriptReference/AudioListener-pause.html 试试这个http://unity3d.com/support/documentation/ScriptReference/AudioListener-pause.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM