官术网_书友最值得收藏!

Importing audio

Let's import game audio--specifically, the music track. This should be dragged and dropped into the music folder (the music track narrow_corridors_short.ogg is included in the book's companion files). Music is an important audio asset that greatly impacts loading times, especially on mobile devices and legacy hardware. Music tracks often exceed 1 minute in duration, and they encode a lot of data. Consequently, additional configuration is usually needed for music tracks to prevent them from burdening your games:

Importing audio files
Ideally, music should be in a WAV format to prevent lossy compression when ported to other platforms. If WAV is not possible, then OGG is another valuable alternative. For more information on audio import settings, refer to the online Unity documentation at:  http://docs.unity3d.com/Manual/AudioFiles.html.

Now, select the imported music track in the Project panel. Disable the Preload Audio Data checkbox, and then change the Load Type to Streaming. This optimizes the music loading process. It means that the music track will be loaded in segments during playback, as opposed to entirely in memory from the start of the level, and it will continually load, segment by segment. This prevents longer initial loading times:

Configuring music for streaming
主站蜘蛛池模板: 突泉县| 北碚区| 三江| 宜宾县| 松原市| 麻江县| 大邑县| 黄平县| 禹州市| 昌平区| 县级市| 徐闻县| 东莞市| 上高县| 永宁县| 黔南| 金山区| 洮南市| 岳西县| 科尔| 民和| 凤城市| 亚东县| 西畴县| 兴和县| 永兴县| 寿阳县| 大余县| 江安县| 右玉县| 鹤山市| 黄骅市| 滨海县| 渝中区| 湖北省| 桐柏县| 德钦县| 波密县| 昌黎县| 乌鲁木齐县| 丹阳市|