public override void OnInspectorGUI() { //Draw default inspector to display field for preset. DrawDefaultInspector(); //Draw inspector for current preset, if current target has one. if (Target.Settings != null) { EditorGUILayout.Space(); EditorGUI.BeginChangeCheck(); FPEditorUtility.DrawPresetInspector(ref m_preset); if (GUI.changed) { Preset = m_preset; } } }
private void OnGUI() { m_scroll = EditorGUILayout.BeginScrollView(m_scroll); GUILayout.Label("Create First Person Controller", EditorStyles.boldLabel); if (Preset != null) { FPEditorUtility.DrawPresetInspector(ref m_preset); } GUILayout.Space(10); m_addCursorController = EditorGUILayout.Toggle("Add Cursor Controller", m_addCursorController); EditorGUILayout.EndScrollView(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Create First Person Controller")) { SavePrefab(); } }
public override void OnInspectorGUI() { FPEditorUtility.DrawPresetInspector(ref m_preset); }