Question by
J0HNNYPANIC · Jun 15, 2016 at 01:15 PM ·
animatorscript.optimizationanimator controllerfbximporter
Does anyone have a script to disable 'import animation'
Hello!
Does anybody have a script that will disable 'Import Animation' under the 'Animations' tab in 'Import Settings'? Right now it's is checked by default so every FBX I import automatically has an animator component attached.
Any help would be very much appreciated.
Thanks in advance!
JP
Comment
Answer by maciekblady · Aug 26, 2016 at 08:11 AM
Hi @J0HNNYPANIC! This should do the trick (put the script in Assets/Editor):
class CustomImporter : AssetPostprocessor
{
void OnPreprocessModel()
{
ModelImporter modelImporter = assetImporter as ModelImporter;
modelImporter.importAnimation = false;
}
}