error cs1061

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;
    }
}

You are trying to set a System.Type to a group of objects and you can’t do that. You probably forgot to place a variable name in front. Like this:

ModelImporterClipAnimation[] clips = modelImporter.clipAnimations;