public static void SetDefaultCulture() { GDXConfig config = GDXConfig.Get(); if (config.localizationSetDefaultCulture && GetSystemLanguage() == Language.Default) { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(GetIETF(config.localizationDefaultCulture)); } }
#pragma warning restore 414 /// <summary> /// Get a loaded instance of the <see cref="GDXConfig" /> from resources. /// </summary> /// <remarks>Requires UnityEngine.CoreModule.dll to function correctly.</remarks> /// <returns>A instance of <see cref="GDXConfig" />.</returns> public static GDXConfig Get() { #if UNITY_EDITOR // Special handler for scenarios where we need runtime logic, that is getting called from editor automation // and things like that. return(AssetDatabase.LoadAssetAtPath <GDXConfig>("Assets/Resources/GDX/GDXConfig.asset")); #else if (s_runtimeInstance == null) { s_runtimeInstance = Resources.Load <GDXConfig>("GDX/GDXConfig"); } return(s_runtimeInstance); #endif }