assetpostprocessor.onpreprocessmodel 在导入模型之前

2015-1-1 11:40| 发布者: 杨炎| 查看: 2695| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: assetpostprocessor.onpreprocessmodel 在导入模型之前functiononpreprocessmodel() : voiddescription描述add this function in a subclass to get a notification just before a model (.fbx, .mb file etc.) is b ...

assetpostprocessor.onpreprocessmodel 在导入模型之前

functiononpreprocessmodel() : void

description描述

add this function in a subclass to get a notification just before a model (.fbx, .mb file etc.) is being imported.

在子类中加入这个函数,以便在模型载入之前获得一个通知。

this lets you control the import settings trough code.

它让你控制导入选项

class mymeshpostprocessor extends assetpostprocessor {

function onpreprocessmodel () {

// disable generation of materials if the file contains

// the @ sign marking it as an animation.

// 如果文件包含@符号,禁用generatematerials

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

var modelimporter :modelimporter= assetimporter;

modelimporter.generatematerials = 0;

}

}

}

相关阅读

文章点评
相关文章