How do get access to animation clips in selected model from EditorWindow?
I need to add some animation events or copy them from other models. So I decided to make a EditorWindow. Unfortunately there's not much information about this, and I'm stuck in here.
void OnGUI() {
GUILayout.Label("Source Object contains Animation Clips", EditorStyles.boldLabel);
sourceObject = (GameObject) EditorGUILayout.ObjectField(sourceObject, typeof(Object), false);
if(GUILayout.Button("Copy")) {
if(sourceObject == null) {
throw new System.NullReferenceException("Source Object is missing.");
}
// Do Copy here
}
}
What I need to do is:
Extract all animation clips from the selected model(fbx) - it's the source object
Select "AnimationClip" to want to copy. Note that AnimationClip in here is not inside of model, it's seperated AnimationClip that duplicated from original model because basically animation clip from imported model is read-only, so I have to duplicate to update it.
How do I get animation clips from selected fbx model with ObjectField? Any advice will very appreciate it.
Your answer
Follow this Question
Related Questions
Scope Animation doesn't work?! 0 Answers
UIElements - Horizontal scrolling is not working in ScrollView even with ScrollViewMode.Horizontal. 0 Answers
Can we have better Animation Clip Browsing? 0 Answers
How to get rect a window of editor? 0 Answers
Having problems with manually animating the Animator, some frames happen twice 0 Answers