/* * Gets the ES2GlobalSettings object from the ES2Init object in /Assets/Easy Save 2/Resources/Easy Save 2/ */ public ES2GlobalSettings GetGlobalSettings() { if (globalSettings == null) { return(globalSettings = (AssetDatabase.LoadAssetAtPath("Assets/Easy Save 2/Resources/ES2/ES2Init.prefab", typeof(GameObject)) as GameObject).GetComponent <ES2GlobalSettings>()); } return(globalSettings); }
public override void OnInspectorGUI() { EditorGUIUtility.LookLikeControls(165f); ES2GlobalSettings targetObj = target as ES2GlobalSettings; targetObj.pcDataPath = EditorGUILayout.TextField("Default PC Data Path:", targetObj.pcDataPath); targetObj.macDataPath = EditorGUILayout.TextField("Default Mac Data Path:", targetObj.macDataPath); //targetObj.saveLocation = (ES2.SaveLocation)EditorGUILayout.EnumPopup("Default Save Location:", (System.Enum)targetObj.saveLocation); targetObj.encryptionPassword = EditorGUILayout.TextField("Default Encryption Password:"******"Default Web Username:"******"Default Web Password:", targetObj.webPassword); }
public override void OnInspectorGUI() { //EditorGUIUtility.labelWidth = 165f; ES2GlobalSettings targetObj = target as ES2GlobalSettings; targetObj.pcDataPath = EditorGUILayout.TextField("Default PC Data Path:", targetObj.pcDataPath); targetObj.macDataPath = EditorGUILayout.TextField("Default Mac Data Path:", targetObj.macDataPath); //targetObj.saveLocation = (ES2.SaveLocation)EditorGUILayout.EnumPopup("Default Save Location:", (System.Enum)targetObj.saveLocation); targetObj.encrypt = EditorGUILayout.Toggle("Encrypt by Default:", targetObj.encrypt); targetObj.encryptionPassword = EditorGUILayout.TextField("Default Encryption Password:"******"Default Web Username:"******"Default Web Password:", targetObj.webPassword); }
public static void ShowGUI(ES2GlobalSettings targetObj) { //targetObj.saveLocation = (ES2.SaveLocation)EditorGUILayout.EnumPopup("Default Save Location:", (System.Enum)targetObj.saveLocation); targetObj.PCDataPath = EditorGUILayout.TextField("Default PC Path:", targetObj.PCDataPath); targetObj.MacDataPath = EditorGUILayout.TextField("Default OSX Path:", targetObj.MacDataPath); targetObj.saveLocation = (ES2Settings.SaveLocation)EditorGUILayout.EnumPopup("Default Save Location:", targetObj.saveLocation); targetObj.encrypt = EditorGUILayout.Toggle("Encrypt Data:", targetObj.encrypt); targetObj.encryptionPassword = EditorGUILayout.TextField("Encryption Password:"******"Encryption Type:", targetObj.encryptionType); targetObj.webUsername = EditorGUILayout.TextField("Web Username:"******"Web Password:", targetObj.webPassword); if (GUI.changed) { EditorUtility.SetDirty(targetObj); } }
public void Draw() { ES2EditorWindowStyle style = ES2EditorWindow.instance.style; EditorGUILayout.BeginVertical(style.windowContentStyle); ES2EditorUtility.Subheading("Default Settings"); EditorGUILayout.BeginVertical(style.sectionStyle); ES2GlobalSettings globals = globalSettings; //globals.saveLocation = (ES2.SaveLocation)EditorGUILayout.EnumPopup("Default Save Location:", (System.Enum)globals.saveLocation); globals.PCDataPath = ES2EditorUtility.TextField("Default Windows Path", globals.PCDataPath); globals.MacDataPath = ES2EditorUtility.TextField("Default OSX Path", globals.MacDataPath); EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(style.sectionStyle); globals.encrypt = ES2EditorUtility.Toggle("Encrypt Data", globals.encrypt); EditorGUILayout.BeginHorizontal(); globals.encryptionPassword = ES2EditorUtility.TextField("Encryption Password", globals.encryptionPassword); globals.saveLocation = (ES2Settings.SaveLocation)ES2EditorUtility.EnumField("Default Save Location", globals.saveLocation); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(style.sectionStyle); EditorGUILayout.BeginHorizontal(); globals.webUsername = ES2EditorUtility.TextField("Web Username", globals.webUsername); globals.webPassword = ES2EditorUtility.TextField("Web Password", globals.webPassword); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); if (GUI.changed) { EditorUtility.SetDirty(globals); } EditorGUILayout.EndVertical(); }
public override void OnInspectorGUI() { ES2GlobalSettings targetObj = target as ES2GlobalSettings; ShowGUI(targetObj); }