Beispiel #1
0
        private static void CheckGlobalInit()
        {
            if (Root.globalInitDone)
            {
                return;
            }
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            if (currentCulture.Name != "en-US")
            {
                Log.Warning("Unexpected culture: " + currentCulture + ". Resetting to en-US.");
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            }
            SteamManager.InitIfNeeded();
            string[] commandLineArgs = Environment.GetCommandLineArgs();
            if (commandLineArgs != null && commandLineArgs.Length > 1)
            {
                Log.Message("Command line arguments: " + GenText.ToSpaceList(commandLineArgs.Skip(1)));
            }
            UnityData.CopyUnityData();
            VersionControl.LogVersionNumber();
            Application.targetFrameRate = 60;
            Prefs.Init();
            if (Prefs.DevMode)
            {
                StaticConstructorOnStartupUtility.ReportProbablyMissingAttributes();
            }
            LongEventHandler.QueueLongEvent(new Action(StaticConstructorOnStartupUtility.CallAll), null, false, null);
            Root.globalInitDone = true;
        }
Beispiel #2
0
 public static void CopyUnityData()
 {
     UnityDataInitializer.initializing = true;
     try
     {
         UnityData.CopyUnityData();
     }
     finally
     {
         UnityDataInitializer.initializing = false;
     }
 }