Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.Editor.AnimationRewizerCustomEditor Class Reference

Animation rewinding custom inspector More...

+ Inheritance diagram for MarkOostveen.TimeRewizer.Editor.AnimationRewizerCustomEditor:
+ Collaboration diagram for MarkOostveen.TimeRewizer.Editor.AnimationRewizerCustomEditor:

Public Member Functions

override void OnInspectorGUI ()
 Editor GUI More...
 
void MakeReady ()
 

Detailed Description

Animation rewinding custom inspector

Member Function Documentation

◆ MakeReady()

void MarkOostveen.TimeRewizer.Editor.AnimationRewizerCustomEditor.MakeReady ( )
86  {
87  if (m_Rewindingtarget.m_Animator.runtimeAnimatorController != null)
88  {
89  AddToAnimator();
90  m_Ready = ReadyCheck();
91  serializedObject.ApplyModifiedProperties();
92  }
93  else
94  {
95  EditorRewizerDebug.LogError(
96  "No animation controller installed can't run setup, please install a animator controller");
97  }
98  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnInspectorGUI()

override void MarkOostveen.TimeRewizer.Editor.AnimationRewizerCustomEditor.OnInspectorGUI ( )

Editor GUI

33  {
34  if (m_Rewindingtarget.LoadScriptableContent() != null)
35  {
36  Color defaultcollor = GUI.color;
37  GUI.color = Color.red;
38  ScriptableBake bake = m_Rewindingtarget.LoadScriptableContent();
39  GUILayout.Label("Contains Animation bake: " + bake.name + " Playtime: " +
40  bake.RunTime("A_R") + " seconds.");
41  GUI.color = defaultcollor;
42  }
43 
44  if (!m_Ready)
45  {
46  GUILayout.Label("ANIMATOR NOT READY");
47  }
48  else
49  {
50  GUILayout.Label("ANIMATOR READY");
51  }
52 
53  GUILayout.Label("Animator for Rewinding");
54  if (GUILayout.Button("Make Ready"))
55  {
56  MakeReady();
57  }
58 
59  if (GUILayout.Button("Clean up"))
60  {
61  if (m_Rewindingtarget.m_Animator.runtimeAnimatorController != null)
62  {
63  RemoveFromAnimtor();
64  m_Ready = ReadyCheck();
65  serializedObject.ApplyModifiedProperties();
66  }
67  else
68  {
69  Debug.LogError(
70  "No animation controller installed can't run cleanup, please install a animator controller");
71  }
72  }
73 
74  m_BugNoticeFol = EditorGUILayout.Foldout(m_BugNoticeFol, "Bug notice");
75 
76  if (m_BugNoticeFol)
77  {
78  GUILayout.Label("note, when first adding Animation rewizer");
79  GUILayout.Label("bug might appear that while rewinding");
80  GUILayout.Label("animator tracks aren't playing");
81  GUILayout.Label("simply reload scene after first add that will work, and solve the issue");
82  }
83  }
+ Here is the call graph for this function: