Exemple #1
0
        internal void Start()
        {
            Scene scene = SceneManager.GetActiveScene();

            numGameObjects = scene.rootCount;

            Application.logMessageReceived += HandleLog;
            DontDestroyOnLoad(this);

            //Load Player Settings
            windowMargin              = PlayerPrefs.GetInt("QModManager_PrefabDebugger_WindowMargin", 50);
            viewMargin                = PlayerPrefs.GetInt("QModManager_PrefabDebugger_ViewMargin", 10);
            showReadonlyProperties    = PlayerPrefs.GetInt("QModManager_PrefabDebugger_ShowReadonlyProperties", 0) == 1 ? true : false;
            showBlacklistedProperties = PlayerPrefs.GetInt("QModManager_PrefabDebugger_ShowBlacklistedProperties", 0) == 1 ? true : false;
            pauseWhenWindowOpen       = PlayerPrefs.GetInt("QModManager_PrefabDebugger_PauseWhenWindowOpen", 0) == 1 ? true : false;

            if (skinUWE == null)
            {
                guiBundle = AssetBundle.LoadFromFile(Path.Combine(Application.dataPath, "Managed/QModManagerAssets.unity3d"));
                if (guiBundle.LoadAsset("SubnauticaGUI") != null)
                {
                    skinUWE = (GUISkin)guiBundle.LoadAsset("SubnauticaGUI");

                    stop_symbol    = (Texture2D)guiBundle.LoadAsset("stop");
                    warning_symbol = (Texture2D)guiBundle.LoadAsset("warning");
                    log_symbol     = (Texture2D)guiBundle.LoadAsset("speech");
                }
                else
                {
                    Logger.Error("Could not load assets from \"QModManagerAssets.unity3d\"");
                }
            }
            LoadSceneObjects();
        }