GetString() private method

private GetString ( string key ) : string
key string
return string
Exemplo n.º 1
0
 public string GetString(string key)
 {
     return(EditorPrefs.GetString(key));
 }
Exemplo n.º 2
0
        private void ReadPreferences()
        {
            m_ScriptEditorPath.str = CodeEditor.Editor.EditorInstallation.Path;

            m_ExternalEditorSupportsUnityProj = EditorPrefs.GetBool("kExternalEditorSupportsUnityProj", false);
            m_ImageAppPath.str = EditorPrefs.GetString("kImagesDefaultApp");

            m_ScriptApps         = BuildAppPathList(m_ScriptEditorPath, kRecentScriptAppsKey, "internal");
            m_ScriptAppsEditions = new string[m_ScriptApps.Length];

            var foundScriptEditorPaths = CodeEditor.Editor.GetFoundScriptEditorPaths();

            foreach (var scriptEditorPath in foundScriptEditorPaths.Keys)
            {
                ArrayUtility.Add(ref m_ScriptApps, scriptEditorPath);
                ArrayUtility.Add(ref m_ScriptAppsEditions, null);
            }

            m_ImageApps = BuildAppPathList(m_ImageAppPath, kRecentImageAppsKey, "");

            m_ScriptAppDisplayNames = BuildFriendlyAppNameList(m_ScriptApps, m_ScriptAppsEditions, foundScriptEditorPaths,
                                                               "Open by file extension");

            m_ImageAppDisplayNames = BuildFriendlyAppNameList(m_ImageApps, null, null,
                                                              L10n.Tr("Open by file extension"));

            m_DiffTools = InternalEditorUtility.GetAvailableDiffTools();

            // only show warning if has team license
            if ((m_DiffTools == null || m_DiffTools.Length == 0) && InternalEditorUtility.HasTeamLicense())
            {
                m_noDiffToolsMessage = InternalEditorUtility.GetNoDiffToolsDetectedMessage();
            }

            string diffTool = EditorPrefs.GetString("kDiffsDefaultApp");

            m_DiffToolIndex = ArrayUtility.IndexOf(m_DiffTools, diffTool);
            if (m_DiffToolIndex == -1)
            {
                m_DiffToolIndex = 0;
            }

            m_AutoRefresh = EditorPrefs.GetBool("kAutoRefresh");

            m_ReopenLastUsedProjectOnStartup = EditorPrefs.GetBool("ReopenLastUsedProjectOnStartup");

            m_UseOSColorPicker            = EditorPrefs.GetBool("UseOSColorPicker");
            m_EnableEditorAnalytics       = EditorPrefs.GetBool("EnableEditorAnalytics", true);
            m_ShowAssetStoreSearchHits    = EditorPrefs.GetBool("ShowAssetStoreSearchHits", true);
            m_VerifySavingAssets          = EditorPrefs.GetBool("VerifySavingAssets", false);
            m_ScriptCompilationDuringPlay = (ScriptChangesDuringPlayOptions)EditorPrefs.GetInt("ScriptCompilationDuringPlay", 0);
            m_DeveloperMode = Unsupported.IsDeveloperMode();

            m_GICacheSettings.m_EnableCustomPath = EditorPrefs.GetBool("GICacheEnableCustomPath");
            m_GICacheSettings.m_CachePath        = EditorPrefs.GetString("GICacheFolder");
            m_GICacheSettings.m_MaximumSize      = EditorPrefs.GetInt("GICacheMaximumSizeGB", 10);
            m_GICacheSettings.m_CompressionLevel = EditorPrefs.GetInt("GICacheCompressionLevel");

            m_SpriteAtlasCacheSize = EditorPrefs.GetInt("SpritePackerCacheMaximumSizeGB");

            m_AllowAttachedDebuggingOfEditor = EditorPrefs.GetBool("AllowAttachedDebuggingOfEditor", true);
            m_EnableEditorLocalization       = EditorPrefs.GetBool("Editor.kEnableEditorLocalization", true);
            m_SelectedLanguage           = EditorPrefs.GetString("Editor.kEditorLocale", LocalizationDatabase.GetDefaultEditorLanguage().ToString());
            m_AllowAlphaNumericHierarchy = EditorPrefs.GetBool("AllowAlphaNumericHierarchy", false);
            m_EnableCodeCoverage         = EditorPrefs.GetBool("CodeCoverageEnabled", false);

            m_CompressAssetsOnImport = Unsupported.GetApplicationSettingCompressAssetsOnImport();
            m_GpuDevice = EditorPrefs.GetString("GpuDeviceName");

            foreach (IPreferenceWindowExtension extension in prefWinExtensions)
            {
                extension.ReadPreferences();
            }
        }
Exemplo n.º 3
0
        internal static string GetPassword(string server, string user)
        {
            string key = "ASPassword::" + server + "::" + user;

            return(EditorPrefs.GetString(key, string.Empty));
        }
Exemplo n.º 4
0
        internal static string GetUser(string server)
        {
            string key = "ASUser::" + server;

            return(EditorPrefs.GetString(key, string.Empty));
        }
Exemplo n.º 5
0
        public static string GetString(string key)
        {
            string empty = string.Empty;

            return(EditorPrefs.GetString(key, empty));
        }
 public static void ReadPreferences()
 {
     CacheServerPreferences.s_CacheServerIPAddress = EditorPrefs.GetString("CacheServerIPAddress", CacheServerPreferences.s_CacheServerIPAddress);
     CacheServerPreferences.s_CacheServerEnabled   = EditorPrefs.GetBool("CacheServerEnabled");
 }
Exemplo n.º 7
0
 internal static string GetUser(string server)
 {
     return(EditorPrefs.GetString("ASUser::" + server, string.Empty));
 }
Exemplo n.º 8
0
 protected override void OnEnable()
 {
     base.OnEnable();
     AddComponentWindow.s_AddComponentWindow = this;
     this.m_Search = EditorPrefs.GetString("ComponentSearchString", "");
 }
Exemplo n.º 9
0
 public static string GetLastIPString()
 {
     return(EditorPrefs.GetString("ProfilerLastIP", string.Empty));
 }
Exemplo n.º 10
0
 public override string GetProjectFooterTemplate(ScriptingLanguage language)
 {
     return(EditorPrefs.GetString("VSProjectFooter", base.GetProjectFooterTemplate(language)));
 }
Exemplo n.º 11
0
 internal static string GetUser(string server) =>
 EditorPrefs.GetString("ASUser::" + server, string.Empty);
Exemplo n.º 12
0
 internal static string GetPassword(string server, string user) =>
 EditorPrefs.GetString("ASPassword::" + server + "::" + user, string.Empty);
Exemplo n.º 13
0
 public static string GetLastIPString() =>
 EditorPrefs.GetString("ProfilerLastIP", "");
Exemplo n.º 14
0
 public static string GetLastIPString()
 {
     return(EditorPrefs.GetString(kLastIP, ""));
 }
Exemplo n.º 15
0
 void LoadActiveSearchEngine()
 {
     activeSearchEngineId = EditorPrefs.GetString(k_ActiveSearchEnginesPrefKey + id, DefaultSearchEngineBase.engineId);
 }