audioimporter.threed 3d

2015-1-3 03:37| 发布者: 杨炎| 查看: 1988| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本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.");

}

}

相关阅读

文章点评
相关文章