SetString() private method

private SetString ( string key, string value ) : void
key string
value string
return void
 internal static void SetPassword(string server, string user, string password)
 {
     EditorPrefs.SetString("ASPassword::" + server + "::" + user, password);
 }
 internal static void AddUser(string server, string user)
 {
     EditorPrefs.SetString("ASUser::" + server, user);
 }
示例#3
0
 internal static void Set <T>(string name, T value) where T : IPrefType
 {
     Load();
     EditorPrefs.SetString(name, value.ToUniqueString());
     m_Prefs[name] = value;
 }
 public static void WritePreferences()
 {
     EditorPrefs.SetString("CacheServerIPAddress", CacheServerPreferences.s_CacheServerIPAddress);
     EditorPrefs.SetBool("CacheServerEnabled", CacheServerPreferences.s_CacheServerEnabled);
 }
        internal static void AddUser(string server, string user)
        {
            string key = "ASUser::" + server;

            EditorPrefs.SetString(key, user);
        }
示例#6
0
 public void OnGUI()
 {
     EditorUpdateWindow.LoadResources();
     GUILayout.BeginVertical(new GUILayoutOption[0]);
     GUILayout.Space(10f);
     GUI.Box(new Rect(13f, 8f, (float)EditorUpdateWindow.s_UnityLogo.image.width, (float)EditorUpdateWindow.s_UnityLogo.image.height), EditorUpdateWindow.s_UnityLogo, GUIStyle.none);
     GUILayout.Space(5f);
     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
     GUILayout.Space(120f);
     GUILayout.BeginVertical(new GUILayoutOption[0]);
     if (this.s_HasConnectionError)
     {
         GUILayout.Label(this.s_ErrorString, "WordWrappedLabel", new GUILayoutOption[]
         {
             GUILayout.Width(405f)
         });
     }
     else if (this.s_HasUpdate)
     {
         GUILayout.Label(string.Format(EditorUpdateWindow.s_TextHasUpdate.text, InternalEditorUtility.GetFullUnityVersion(), this.s_LatestVersionString), "WordWrappedLabel", new GUILayoutOption[]
         {
             GUILayout.Width(300f)
         });
         GUILayout.Space(20f);
         this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, new GUILayoutOption[]
         {
             GUILayout.Width(405f),
             GUILayout.Height(200f)
         });
         GUILayout.Label(this.s_LatestVersionMessage, "WordWrappedLabel", new GUILayoutOption[0]);
         EditorGUILayout.EndScrollView();
         GUILayout.Space(20f);
         GUILayout.BeginHorizontal(new GUILayoutOption[0]);
         if (GUILayout.Button("Download new version", new GUILayoutOption[]
         {
             GUILayout.Width(200f)
         }))
         {
             Help.BrowseURL(this.s_UpdateURL);
         }
         if (GUILayout.Button("Skip new version", new GUILayoutOption[]
         {
             GUILayout.Width(200f)
         }))
         {
             EditorPrefs.SetString("EditorUpdateSkipVersionString", this.s_LatestVersionString);
             base.Close();
         }
         GUILayout.EndHorizontal();
     }
     else
     {
         GUILayout.Label(string.Format(EditorUpdateWindow.s_TextUpToDate.text, Application.unityVersion), "WordWrappedLabel", new GUILayoutOption[]
         {
             GUILayout.Width(405f)
         });
     }
     GUILayout.EndVertical();
     GUILayout.EndHorizontal();
     GUILayout.Space(8f);
     GUILayout.FlexibleSpace();
     GUILayout.BeginHorizontal(new GUILayoutOption[]
     {
         GUILayout.Height(20f)
     });
     GUILayout.FlexibleSpace();
     GUI.changed = false;
     EditorUpdateWindow.s_ShowAtStartup = GUILayout.Toggle(EditorUpdateWindow.s_ShowAtStartup, EditorUpdateWindow.s_CheckForNewUpdatesText, new GUILayoutOption[0]);
     if (GUI.changed)
     {
         EditorPrefs.SetBool("EditorUpdateShowAtStartup", EditorUpdateWindow.s_ShowAtStartup);
     }
     GUILayout.Space(10f);
     GUILayout.EndHorizontal();
     GUILayout.EndVertical();
 }
 private void OnScriptEditorArgsChanged()
 {
     EditorPrefs.SetString("kScriptEditorArgs" + this.m_ScriptEditorPath.str, this.m_ScriptEditorArgs);
     EditorPrefs.SetString("kScriptEditorArgs", this.m_ScriptEditorArgs);
 }
        public void OnGUI()
        {
            LoadResources();


            GUILayout.BeginVertical();
            GUILayout.Space(10);
            GUI.Box(new Rect(13, 8, s_UnityLogo.image.width, s_UnityLogo.image.height), s_UnityLogo, GUIStyle.none);
            GUILayout.Space(5);
            GUILayout.BeginHorizontal();
            GUILayout.Space(120);
            GUILayout.BeginVertical();

            if (s_HasConnectionError)
            {
                GUILayout.Label(s_ErrorString, "WordWrappedLabel", GUILayout.Width(405));
            }
            else if (s_HasUpdate)
            {
                GUILayout.Label(string.Format(s_TextHasUpdate.text, InternalEditorUtility.GetFullUnityVersion(), s_LatestVersionString), "WordWrappedLabel", GUILayout.Width(300));

                GUILayout.Space(20);
                m_ScrollPos = EditorGUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(405), GUILayout.Height(200));
                GUILayout.Label(s_LatestVersionMessage, "WordWrappedLabel");
                EditorGUILayout.EndScrollView();

                GUILayout.Space(20);
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Download new version", GUILayout.Width(200)))
                {
                    Help.BrowseURL(s_UpdateURL);
                }

                if (GUILayout.Button("Skip new version", GUILayout.Width(200)))
                {
                    EditorPrefs.SetString("EditorUpdateSkipVersionString", s_LatestVersionString);
                    Close();
                }
                GUILayout.EndHorizontal();
            }
            else
            {
                GUILayout.Label(string.Format(s_TextUpToDate.text, Application.unityVersion), "WordWrappedLabel", GUILayout.Width(405));
            }


            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            GUILayout.Space(8);


            GUILayout.FlexibleSpace();
            GUILayout.BeginHorizontal(GUILayout.Height(20));
            GUILayout.FlexibleSpace();
            GUI.changed     = false;
            s_ShowAtStartup = GUILayout.Toggle(s_ShowAtStartup, s_CheckForNewUpdatesText);
            if (GUI.changed)
            {
                EditorPrefs.SetBool("EditorUpdateShowAtStartup", s_ShowAtStartup);
            }

            GUILayout.Space(10);
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
        }
 public void SetString(string key, string value)
 {
     EditorPrefs.SetString(key, value);
 }
示例#10
0
 protected override void OnDisable()
 {
     s_AddComponentWindow = null;
     EditorPrefs.SetString(kComponentSearch, m_Search);
 }
 static void SetTmpMethodNames(string value)
 {
     EditorPrefs.SetString(TmpMethodNamesKey, value);
 }