找回密碼
 注冊帳號

掃一掃,訪問微社區

assetpostprocessor.onpreprocessmodel 在導入模型之前

2015-1-1 08:11| 發布者: 楊炎| 查看: 2967| 評論: 0|原作者: 蠻牛|來自: unity3d腳本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;

}

}

}

相關閱讀

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