public override void OnInspectorGUI() { serializedObject.Update(); prop = (RCC_SceneManager)target; EditorGUILayout.HelpBox("Scene manager that contains current player vehicle, current player camera, current player UI, current player character, recording/playing mechanim, and other vehicles as well.", MessageType.Info); EditorGUILayout.Space(); EditorGUILayout.PropertyField(serializedObject.FindProperty("registerFirstVehicleAsPlayer"), new GUIContent("Register First Vehicle As Player"), false); EditorGUILayout.PropertyField(serializedObject.FindProperty("disableUIWhenNoPlayerVehicle"), new GUIContent("Disable UI When No Player Vehicle"), false); EditorGUILayout.PropertyField(serializedObject.FindProperty("loadCustomizationAtFirst"), new GUIContent("Load Customization At First"), false); EditorGUILayout.LabelField("Debug", EditorStyles.boldLabel); EditorGUILayout.Space(); EditorGUI.BeginDisabledGroup(true); EditorGUILayout.PropertyField(serializedObject.FindProperty("activePlayerVehicle"), new GUIContent("Active Player Vehicle"), false); EditorGUILayout.PropertyField(serializedObject.FindProperty("activePlayerCamera"), new GUIContent("Active Player Camera"), false); EditorGUILayout.PropertyField(serializedObject.FindProperty("activePlayerCanvas"), new GUIContent("Active Player UI Canvas"), false); #if BCG_ENTEREXIT EditorGUILayout.PropertyField(serializedObject.FindProperty("activePlayerCharacter"), new GUIContent("Active Player FPS / TPS Character"), false); #endif EditorGUILayout.Space(); EditorGUILayout.PropertyField(serializedObject.FindProperty("recordMode"), new GUIContent("Record Mode"), false); EditorGUILayout.Space(); EditorGUILayout.PropertyField(serializedObject.FindProperty("allVehicles"), new GUIContent("All Vehicles"), true); EditorGUILayout.Space(); EditorGUI.EndDisabledGroup(); serializedObject.ApplyModifiedProperties(); if (GUI.changed) { EditorUtility.SetDirty(prop); } }
///<summary> /// Sets the main controller type. ///</summary> public static void SetController(int controllerIndex) { RCC_SceneManager.SetController(controllerIndex); Debug.Log("Main Controller has been changed to " + controllerIndex.ToString()); }
///<summary> /// Sets new behavior. ///</summary> public static void SetBehavior(int behaviorIndex) { RCC_SceneManager.SetBehavior(behaviorIndex); Debug.Log("Mobile Controller has been changed to " + behaviorIndex.ToString()); }