public static void ControllerChanged() { foreach (AnimEditor editor in AnimEditor.GetAllAnimationWindows()) { editor.OnControllerChange(); } }
public static void ControllerChanged() { using (List <AnimEditor> .Enumerator enumerator = AnimEditor.GetAllAnimationWindows().GetEnumerator()) { while (enumerator.MoveNext()) { enumerator.Current.OnControllerChange(); } } }
public void OnEnable() { if (m_AnimEditor == null) { m_AnimEditor = CreateInstance(typeof(AnimEditor)) as AnimEditor; m_AnimEditor.hideFlags = HideFlags.HideAndDontSave; } s_AnimationWindows.Add(this); titleContent = GetLocalizedTitleContent(); m_DefaultTitleContent = titleContent; m_RecordTitleContent = EditorGUIUtility.TextContentWithIcon(titleContent.text, "Animation.Record"); OnSelectionChange(); Undo.undoRedoPerformed += UndoRedoPerformed; }
public override void Initialize(GameObject root) { this.animEditor = new AnimEditor(); var animation = new AnimationClip(); var curveBinding = new EditorCurveBinding { type = typeof(SkinnedMeshRenderer), path = "Root", propertyName = "propName" }; var curve = new AnimationCurve(); curve.AddKey(0f, 0); curve.AddKey(1f, 1); AnimationUtility.SetEditorCurve(animation, curveBinding, curve); this.animEditor.Initialize(animation); }
private void btAnim_Click(object sender, EventArgs e) { var f = new AnimEditor(); formMain.subeditorOpen(f, (ToolStripButton)sender, true); }