assetpostprocessor.onpreprocesstexture 在导入纹理之前

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

摘要: assetpostprocessor.onpreprocesstexture 在导入纹理之前functiononpreprocesstexture() : voiddescription描述add this function in a subclass to get a notification just before the texture importer is run.在 ...

assetpostprocessor.onpreprocesstexture导入纹理之前

functiononpreprocesstexture() : void

description描述

add this function in a subclass to get a notification just before the texture importer is run.

在子类中重载这个函数以便在纹理导入器运行之前获取通知

this lets you setup default values for the import settings.

这允许你设置默认值到导入选项

class mytexturepostprocessor extends assetpostprocessor

{

function onpreprocesstexture () {

// automatically convert any texture file with "_bumpmap"

// in its file name into a normal map.

//自动转换文件名带有_bumpmap的任意纹理文件为一个法线贴图

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

var textureimporter : textureimporter = assetimporter;

textureimporter.converttonormalmap = true;

}

}

相关阅读

文章点评
相关文章