//Rect m_bgRect = ; void OnSceneGUI() { if (!VertExmotionEditor.m_editorInitialized) { VertExmotionEditor.InitializeEditorParameters(); } VertExmotionEditor.m_showPanelProgress = 1f; VertExmotionEditor.m_showPanel = true; VertExmotionEditor.UpdateShowPanel(); float menuWidth = 215f; Handles.BeginGUI(); VertExmotionEditor.DrawBackground(); GUILayout.BeginHorizontal(); GUILayout.Space(5); m_scrollViewPos = GUILayout.BeginScrollView(m_scrollViewPos, GUILayout.Width(menuWidth)); DrawSensorSettings(target as VertExmotionSensorBase); GUILayout.Space(10f); if (VertExmotionEditor.m_lastVTMSelected != null) { if (GUILayout.Button("Select " + VertExmotionEditor.m_lastVTMSelected.gameObject.name)) { Selection.activeGameObject = VertExmotionEditor.m_lastVTMSelected.gameObject; } } GUILayout.EndScrollView(); GUILayout.EndHorizontal(); Handles.EndGUI(); DrawSensorHandle(target as VertExmotionSensorBase); }
public override void OnInspectorGUI() { if (!VertExmotionEditor.m_editorInitialized) { VertExmotionEditor.InitializeEditorParameters(); } VertExmotionSensorBase vms = target as VertExmotionSensorBase; //DrawDefaultInspector (); DrawSensorSettings(vms); //vms.m_params.damping = Mathf.Clamp( EditorGUILayout.FloatField( "damping", vms.m_params.damping ), 0, 30f ); //vms.m_params.bouncing = Mathf.Clamp( EditorGUILayout.FloatField( "bouncing", vms.m_params.bouncing ), 0, 30f ); /* * PID pid = new PID (); * pid.m_params = new PID.Parameters( vms.m_pid.m_params ); * * * GUILayout.Box( " ", VertExmotionEditor.m_bgStyle, GUILayout.Height(50f), GUILayout.ExpandWidth(true) ); * pid.GUIDrawResponse ( GUILayoutUtility.GetLastRect(), m_timeUnit ); * m_timeUnit = EditorGUILayout.FloatField ("time unit (s)",m_timeUnit); * m_timeUnit = Mathf.Clamp ( m_timeUnit, 1f, 10f); */ if (VertExmotionEditor.m_lastVTMSelected != null) { if (GUILayout.Button("Select " + VertExmotionEditor.m_lastVTMSelected.gameObject.name)) { Selection.activeGameObject = VertExmotionEditor.m_lastVTMSelected.gameObject; } } #if KVTM_DEBUG GUILayout.Label("--------------\nDEBUG\n--------------"); DrawDefaultInspector(); #endif }