Last active
August 29, 2015 14:20
-
-
Save Legogo/44c917aa97ae2c3581a3 to your computer and use it in GitHub Desktop.
Auto setup import fbx settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
public class FbxImporter : AssetPostprocessor { | |
void OnPreprocessModel() { | |
ModelImporter model = (ModelImporter)assetImporter; | |
model.addCollider = true;// This tells it to add a collider to the object | |
model.meshCompression = ModelImporterMeshCompression.High; | |
model.isReadable = false; | |
model.importBlendShapes = false; | |
model.importAnimation = false; | |
model.importMaterials = false; | |
//modelImporter.globalScale=1;// This changes the "Scale Factor". | |
} | |
} | |
#else | |
public class FbxImporter { | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment