Assets/GameContent/Motiontracks/Editor/AnimationImporter.cs(60,68): error CS1061: Type UnityEditor.ModelImporter' does not contain a definition for clipanimations’ and no extension method clipanimations' of type UnityEditor.ModelImporter’ could be found (are you missing a using directive or an assembly reference?)
So I was trying to import more Animations, I tried using other “clipanimation” extensions/directives. That didn’t work. I really need your help. This is due tomorrow. The error is in the first line, Here’s the code:
ModelImporterClipAnimation = modelImporter.clipanimations;
Object asset = AssetDatabase.LoadAssetAtPath(assetPath, typeof(GameObject));
EditorUtility.SetDirty(asset);
AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);
}
}
private ModelImporterClipAnimation SetClipAnimationNew(string name, int firstFrame, int lastFrame, bool loop)
{
ModelImporterClipAnimation mica = new ModelImporterClipAnimation();
mica.name = name;
mica.firstFrame = firstFrame;
mica.lastFrame = lastFrame;
mica.loop = loop;
if (loop)
mica.wrapMode = WrapMode.Loop;
else
mica.wrapMode = WrapMode.Once;
return mica;
}
}
Also it should be an array and "clipAnimations" has an upper case 'A' in it.
– GameVortexGood point :p
– ThePunisherThat didn't help.
– raze_incorporatedDid you try it with what GameVortex mentioned? I updated the answer. Try it again.
– ThePunisherI didn't see an updated answer.
– raze_incorporated