Unity Api翻译之Audio Listener


Audio Listener

音频监听器

The Audio Listener acts as a microphone-like device. It receives input from any given Audio Source in the scene

音频监听器就是像麦克风那样的装置。它接受从当前场景中所有的提供的音频资源以及通过电脑的音箱传递出去

 and plays sounds through the computer speakers. For most applications it makes the most sense to attach the

对于大多数应用程序合理的做法

 listener to the Main Camera. If an audio listener is within the boundaries of a Reverb Zone reverberation is applied

将监听脚本挂在住摄像机上。如果一个音频监听器的范围是混合音响区

 to all audible sounds in the scene. (PRO only) Furthermore, Audio Effects can be applied to the listener and it will

混响是适用于所有来自场景的音频。(只有Pro版享有)另外,音频效果还可以应用到监听器,

 be applied to all audible sounds in the scene.

它将适用于所有来自现场的声音。


The Audio Listener, attached to the Main Camera
将音频监听器,挂载主摄像机上

Properties

性能

The Audio Listener has no properties. It simply must be added to work. It is always added to the Main Camera by default.

音频监听器没有属性。它必须被添加到某个对象上才能工作。它默认情况是添加到主摄像机上。

Details

详细

The Audio Listener works in conjunction with Audio Sources, allowing you to create the aural experience for your 

音频监听器结合音频资源,允许在你的游戏中创建听觉的体验

games. When the Audio Listener is attached to a GameObject in your scene, any Sources that are close enough to 

当音频监听器挂在你场景中的某个GameObject 对象时,任何资源,谁更接近监听器,它的声音将被

the Listener will be picked up and output to the computer's speakers. Each scene can only have 1 Audio Listener to 

输出从电脑的音响。每个创建中只能有一个音频监听器正常工作。

work properly.

If the Sources are 3D (see import settings in Audio Clip), the Listener will emulate position, velocity and orientation of 

如果音频资源是3D的(见进口设置的音频剪辑),监听器将会模仿其位置,速度和方向

the sound in the 3D world (You can tweak attenuation and 3D/2D behavior in great detail in Audio Source) . 2D will

声音在3D世界(你能调整减弱 和3D/2D行为在Audio Source中有更详细的接受)。

 ignore any 3D processing. For example, if your character walks off a street into a night club, the night club's music 

2D的音频将忽略3D音频中的任何处理。例如,如果你的角色走在街道上进入一个夜总会,这个夜总会的音乐

should probably be 2D, while the individual voices of characters in the club should be mono with their realistic

应该是2D的,然后这个角色的声音在夜总会中应该从他当前的位置发出,这个将交给Unity处理。

 positioning being handled by Unity.

You should attach the Audio Listener to either the Main Camera or to the GameObject that represents the player. Try both to find what suits your game best.

你应该吧摄像机挂在摄像机上或者一个主要的游戏对象上。尝试着找到这样是最合适的对于你的游戏。


Hints

  • Each scene can only have one Audio Listener.
  • 每一个场景中只能有一个音频监听器。
  • You access the project-wide audio settings using the Audio Manager, found in the Edit->Project Settings->Audio menu.
  • 你可以通过项目的范围的音频设置来使用音频管理者,在菜单 Edit->Project Settings->Audio可以找到
  • View the Audio Clip Component page for more information about Mono vs Stereo sounds.
  • 查看音频剪辑组件的页面,将获得更多的信息关于Mono vs立体音效的。

Page last updated: 2010-09-10


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值