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

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
主站蜘蛛池模板: 霍城县| 肥城市| 博爱县| 淅川县| 南乐县| 兴和县| 鄂温| 浦江县| 乌兰察布市| 芜湖市| 务川| 珠海市| 曲阳县| 博爱县| 垫江县| 屯门区| 胶南市| 湄潭县| 双城市| 龙门县| 房产| 寻乌县| 井研县| 沙雅县| 大连市| 当阳市| 新晃| 武邑县| 平潭县| 宁河县| 交城县| 侯马市| 大连市| 湘西| 江安县| 凤凰县| 邛崃市| 肇州县| 新昌县| 永年县| 余庆县|