AssetPostprocessor.OnPreprocessModel 在导入模型之前
function OnPreprocessModel () : void
Description描述[狗刨学习网]unity3d animation
Add this function in a subclass to get a notification just before a model (.fbx, .mb file etc.) is being imported.
在子类中加入这个函数,以便在模型载入之前获得一个通知。
function OnPreprocessModel () : void
Description描述[狗刨学习网]unity3d animation
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.
它让你控制导入选项
1. class MyMeshPostprocessor extends AssetPostprocessor {
2. function OnPreprocessModel () {
3. <span class="notes">// Disable generation of materials if the file contains
4. // the @ sign marking it as an animation.
5. // 如果文件包含@符号,禁用generateMaterials</span>
6. if (assetPath.Contains("@")) {
7. var modelImporter : ModelImporter = assetImporter;
8. ateMaterials = 0;
9. }
10. }
11. }
复制代码
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论