找回密碼
 注冊帳號

掃一掃,訪問微社區

audioimporter.threed 3d

2015-1-3 03:37| 發布者: 楊炎| 查看: 2194| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: audioimporter.threed 3dvarthreed: booldescription描述set/get the way unity is loading the audio data.設置/獲取unity加載音頻數據的方法。// simple script that if an imported audio contains the "dl_" str ...

audioimporter.threed 3d

varthreed: bool

description描述

set/get the way unity is loading the audio data.

設置/獲取unity加載音頻數據的方法。

// simple script that if an imported audio contains the "dl_" string

// in its filename, it sets the loadtype to decompressonload.

//如果一個導入的音頻它的名字中包含dl_字符串,它設置加載類型到decompressonload

class myaudiopostprocessor extendsassetpostprocessor{

function onpreprocessaudio () {

if (assetpath.contains("dl_")) {

var audioimporter : audioimporter = assetimporter;

audioimporter.loadtype =audioimporterloadtype.decompressonload;

}

}

}

see also: audioimporterloadtype is this clip a 2d or 3d sound?

audioimporterloadtype這個剪輯是看一個2d或3d聲音?

// prints a warning if the imported audio is a 2d sound.

//如果導入的音頻是一個2d聲音,打印警告

class warning2d extendsassetpostprocessor{

function onpreprocessaudio () {

var audioimporter : audioimporter = assetimporter;

if(!audioimporter.threed)

debug.logwarning(assetpath + " is not a 3d audio.");

}

}

相關閱讀

文章點評
相關文章
女校游泳队彩金