- 最后登录
- 2018-6-29
- 注册时间
- 2011-7-1
- 阅读权限
- 20
- 积分
- 359
- 纳金币
- 335582
- 精华
- 0
|
Audio Source
The Audio Source in the Scene View and Inspector
音频源的场景视图和检视窗口
Properties
属性
Audio Clip
Reference to the sound clip file that will be played
音频剪辑
要播放声音剪辑的引用
Play On Awake
if enabled, the sound will start playing the moment the scene launches. If disabled, you need to start it using the Play() command from scripting.
自动播放
如果勾选,则声音会在场景加载完毕后开始播放。如果没有勾选,则需要你自己在脚本里调用Play()方法进行播放
Volume
How loud the sound is at a distance of 1 world unit (1 meter) from the Audio Listener.
音量
当音频侦听器距离它一米时声音的大小.
Pitch
Amount of change in pitch due to slowdown/speed up of the Audio Clip. Value 1 is normal playback speed.
音调
调节音频剪辑播放的速率来改变音调. 1代表正常的播放速度.
Min Volume
The minimum value of the sound. No matter how far away you get, the sound will not get softer than this value.
最小音量
声音的最小音量,不论距离该音频源多远,声音都不会比这个设定值来得更微弱.
Max Volume
How loud the sound gets at the loudest. No matter how close you get, the sound will never get louder than this value.
最大音量
声音播放的最大音量,不论多靠近找个音频源,音量都不会大于这个值.
Rolloff Factor
How fast the sound fades. The higher the value, the closer the Listener has to be before hearing the sound.
滚降系数
声音衰退的系数,值越高,就要越靠近音频源才能听到声音.
Loop
Enable this to make the Audio Clip loop when it reaches the end.
循环
音频剪辑(Audio Clip)是否循环播放.
Creating Audio Sources
创建音频剪辑
Audio Sources don't do anything without an assigned Audio Clip. The Clip is the actual sound file that will be played back. The Source is like a controller for starting and stopping playback of that clip, and modifying other audio properties.
Audio Source(音频源)如果没有指定Audio Clip(音频剪辑)不会做任何事。音频剪辑是将要被播放的声音文件,音频源就像控制器一样,用来启动和停止播放剪辑,以及修改其他的音频属性。
To create a new Audio Source:
创建一个新的源
import your audio files into your Unity Project. These are now Audio Clips.
将你的音频文件导入到你的unity工程后,就变成了Audio Clip(音频剪辑)
Go to GameObject->Create Empty from the menubar.
菜单栏里选择"GameObject"->"Create Empty".创建一个新的空对象。
With the new GameObject selected, select Component->Audio->Audio Source.
选中这个新的对象,用"Component"->"Audio"->"Audio Source",给该对象加入Audio Source组件。
Assign the Audio Clip property of the Audio Source Component in the Inspector.
在检视窗口里指定Audio Source(音频剪辑)组件的Audio Clip(音频剪辑)属性。
Hints
提示
The key to a nice sound environment is tweaking the Rolloff Factor.
一个不错的声音环境的关键是调整滚降系数
3D audio effects will only work for mono Audio Clips. Stereo Audio Clips will be mixed as-is into the sound output.
3D音频效果只能用单声道音频剪辑,立体声音频剪辑则保持原样输出。 |
|