internal static void EditWithImporter(AnimationClip clip)
{
ModelImporter atPath = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(clip)) as ModelImporter;
if (atPath != null)
{
Selection.activeObject = AssetDatabase.LoadMainAssetAtPath(atPath.assetPath);
ModelImporterEditor editor = Editor.CreateEditor(atPath) as ModelImporterEditor;
EditorPrefs.SetInt(editor.GetType().Name + "ActiveEditorIndex", 2);
int num = 0;
ModelImporterClipAnimation[] clipAnimations = atPath.clipAnimations;
for (int i = 0; i < clipAnimations.Length; i++)
{
if (clipAnimations[i].name == clip.name)
{
num = i;
}
}
EditorPrefs.SetInt("ModelImporterClipEditor.ActiveClipIndex", num);
}
}