• assetpostprocessor.onpreprocessmodel 在导入模型之前 - 脚本手册 - -【游戏蛮牛】-游戏出海,ar增强现实,虚拟现实,unity3d,unity3d教程下载首选u3d,unity3d官网 - Powered by Discuz!
     找回密码
     注册帐号

    扫一扫,访问微社区

    assetpostprocessor.onpreprocessmodel 在导入模型之前

    2015-1-1 11:40| 发布者: 杨炎| 查看: 2862| 评论: 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;

    }

    }

    }

    相关阅读

    文章点评
    相关文章