Skip to content

Instantly share code, notes, and snippets.

@Legogo
Last active August 29, 2015 14:20
Show Gist options
  • Save Legogo/44c917aa97ae2c3581a3 to your computer and use it in GitHub Desktop.
Save Legogo/44c917aa97ae2c3581a3 to your computer and use it in GitHub Desktop.
Auto setup import fbx settings
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