包含11節(jié)視頻教程
從零基礎(chǔ)學(xué)習(xí)unity3d游戲引擎,簡(jiǎn)單易學(xué)的視頻教程,讓你快速掌握unity3d,并喜歡上游戲開(kāi)發(fā)的樂(lè)趣。
![]()
|
![]() Audio Clips are audio data used by Audio Sources. Unity supports mono, stereo and multi (up to 8) channels audio assets. Unity supports importing the following audio file formats: .aif, .wav, .mp3, and .ogg, and the following tracker module file formats: .xm, .mod, .it, and .s3m. The tracker module assets works the same way as any other audio assets in Unity except no waveform preview can be rendered to the asset import inspector. 音頻剪輯被音源所使用來(lái)表現(xiàn)被導(dǎo)入到Unity的音頻資產(chǎn)。Unity同時(shí)支持單聲道和立體聲音頻資產(chǎn)。Unity支持導(dǎo)入以下音頻文件格式:.aif, .wav, .mp3, 和 .ogg,和以下音軌模塊:.xm, .mod, .it, 和 .s3m。在Unity音軌模塊資源和其他音頻資源一樣,除了無(wú)波形預(yù)覽渲染到資源導(dǎo)入檢視面板。
Properties 屬性
Importing Audio Assets 導(dǎo)入音頻資源Unity supports both Compressed and Native Audio. Any type of file (except MP3/Ogg Vorbis) will be initially imported as Native. Compressed audio files must be decompressed by the CPU while the game is running, but are smaller in file size. If Stream is checked the audio is decompressed on the fly, or else the audio is decompressed entirely upon load. Native PCM formats (WAV, AIFF) have the benefit of being higher fidelity without increasing CPU taxation, but create much larger files. Module files (.mod,.it,.s3m..xm) can deliver very high quality with an extremely low footprint. Unity支持壓縮的和原生的音頻。任何類型的文件(MP3/Ogg Vorbis的除外),最初都以原生音頻導(dǎo)入(Native即不經(jīng)任何處理的音頻本身)。游戲運(yùn)行時(shí),壓縮音頻文件必須由CPU解壓縮,但文件要較小。流(Stream )被選擇,音頻在將運(yùn)行時(shí)解壓縮,或者音頻在加載時(shí)完全解縮。原生PCM格式(WAV,AIFF)有在不增加CPU資源同時(shí)有更高的保真度的好處,但創(chuàng)建更大的文件。模塊文件(.MOD,.S3M,. XM)可以提供非常高的質(zhì)量與極低的占用空間。 As a general rule of thumb, Compressed audio(or modules) are best for long files like background music or dialog, and uncompressed is better for short sound effects. Tweak the amount of Compression with the compression slider to just before the difference in sound quality is noticeable. 一般的經(jīng)驗(yàn)是,壓縮音頻(或模塊)最好是長(zhǎng)文件,如背景音樂(lè)或?qū)υ,未壓縮的用于短聲音效果更好。用壓縮滑動(dòng)條(Compression)來(lái)調(diào)整壓縮量,前后音質(zhì)的差異是明顯的。 Using 3D Audio 使用3D音頻If an audio clip is marked as a 3D Sound then it will be played back to simulate its position in the game world's 3D space. 3D sounds emulate distance and location of sounds by attenuating volume and panning across speakers. Both mono and multiple channel sounds can be positioned in 3D. For multiple channel audio, use the spread option on the Audio Source to spread and split out the discrete channels in speaker space. Unity offers a variety of options to control and fine-tune the audio behavior in 3D space. Take a look at Audio Source. 如果音頻剪輯標(biāo)記為3D聲音(3D Sound),它會(huì)模擬在游戲世界三維空間中的位置播放。 3D聲音以衰減音量和揚(yáng)聲器之間平衡調(diào)整模擬聲音的距離和位置。單聲道和??多聲道聲音都可以放置在三維空間。對(duì)于多聲道音頻,使用的音頻源(Audio Source)中的擴(kuò)散(spread )選項(xiàng)來(lái)擴(kuò)散并在揚(yáng)聲器空間分離出離散通道。Unity提供了多個(gè)選項(xiàng),來(lái)控制和微調(diào)三維空間中音頻的行為。參見(jiàn)音頻源(Audio Source)。 Platform specific details 平臺(tái)支持細(xì)節(jié)iOS
On mobile platforms compressed audio is encoded as MP3 for less CPU intensive decompression. 在移動(dòng)平臺(tái)上的壓縮音頻以MP3格式編碼,以在解壓縮時(shí)占用更少的CPU資源。 For performance reasons audio clips can be played back using the Apple hardware codec. To enable this check the "Hardware Decoding" checkbox in the Audio Importer. Note that only one hardware audio stream can be decompressed at a time, including the background iPod audio. 出于性能方面的原因音頻剪輯可以使用蘋(píng)果的硬件編解碼器進(jìn)行播放。要啟用它,在音頻導(dǎo)入器(Audio Importer)下的"硬件解碼(Hardware Decoding)"復(fù)選框勾選上。請(qǐng)注意,同一時(shí)間只能有一個(gè)硬件音頻流解壓縮,包括背景的iPod音頻。 If the hardware decoder is not available, the decompression will fall back on the software decoder (on iPhone 3GS or newer Apple's software decoder is used over Unity's(FMOD) own decoder). 如果硬件解碼器不可用,解壓的任務(wù)將落在軟件解碼器上(iPhone 3GS或更新的蘋(píng)果軟件解碼器是使用Unity(FMOD)自帶的解碼器)。 Android
On mobile platforms compressed audio is encoded as MP3 for less CPU intensive decompression. 在移動(dòng)平臺(tái)上的壓縮音頻以MP3格式編碼,以在解壓縮時(shí)占用更少的CPU資源。 贊0 踩0 |
未知用戶
2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved
VIP