void SetupEditorVariables() { cameraTranslateMode = (CPC_EManipulationModes)PlayerPrefs.GetInt("CPC_cameraTranslateMode", 1); cameraRotationMode = (CPC_EManipulationModes)PlayerPrefs.GetInt("CPC_cameraRotationMode", 1); handlePositionMode = (CPC_EManipulationModes)PlayerPrefs.GetInt("CPC_handlePositionMode", 0); waypointMode = (CPC_ENewWaypointMode)PlayerPrefs.GetInt("CPC_waypointMode", 0); }
void DrawManipulationDropdown() { manipulationFoldout = EditorGUILayout.Foldout(manipulationFoldout, "Transform manipulation modes"); EditorGUI.BeginChangeCheck(); if (manipulationFoldout) { GUILayout.BeginVertical("Box"); cameraTranslateMode = (CPC_EManipulationModes)EditorGUILayout.EnumPopup("Waypoint Translation", cameraTranslateMode); cameraRotationMode = (CPC_EManipulationModes)EditorGUILayout.EnumPopup("Waypoint Rotation", cameraRotationMode); handlePositionMode = (CPC_EManipulationModes)EditorGUILayout.EnumPopup("Handle Translation", handlePositionMode); GUILayout.EndVertical(); } if (EditorGUI.EndChangeCheck()) { PlayerPrefs.SetInt("CPC_cameraTranslateMode", (int)cameraTranslateMode); PlayerPrefs.SetInt("CPC_cameraRotationMode", (int)cameraRotationMode); PlayerPrefs.SetInt("CPC_handlePositionMode", (int)handlePositionMode); SceneView.RepaintAll(); } }