Exemple #1
0
        /// <summary>
        /// Initialize UnityExplorer with the provided Loader implementation.
        /// </summary>
        public static void Init(IExplorerLoader loader)
        {
            if (Loader != null)
            {
                LogWarning("UnityExplorer is already loaded!");
                return;
            }
            Loader = loader;

            Log($"{NAME} {VERSION} initializing...");

            if (!Directory.Exists(Loader.ExplorerFolder))
            {
                Directory.CreateDirectory(Loader.ExplorerFolder);
            }

            ConfigManager.Init(Loader.ConfigHandler);
            UERuntimeHelper.Init();
            ExplorerBehaviour.Setup();
            UnityCrashPrevention.Init();

            UniverseLib.Universe.Init(ConfigManager.Startup_Delay_Time.Value, LateInit, Log, new()
            {
                Disable_EventSystem_Override = ConfigManager.Disable_EventSystem_Override.Value,
                Force_Unlock_Mouse           = ConfigManager.Force_Unlock_Mouse.Value,
                Unhollowed_Modules_Folder    = loader.UnhollowedModulesFolder
            });
        }
        public static void Init(IExplorerLoader loader)
        {
            if (Instance != null)
            {
                Log("An instance of UnityExplorer is already active!");
                return;
            }

            Loader   = loader;
            Instance = new ExplorerCore();

            if (!Directory.Exists(Loader.ExplorerFolder))
            {
                Directory.CreateDirectory(Loader.ExplorerFolder);
            }

            ConfigManager.Init(Loader.ConfigHandler);

            RuntimeProvider.Init();

            InputManager.Init();

            Log($"{NAME} {VERSION} initialized.");

            RuntimeProvider.Instance.StartCoroutine(SetupCoroutine());
        }
Exemple #3
0
        /// <summary>
        /// Initialize UnityExplorer with the provided Loader implementation.
        /// </summary>
        public static void Init(IExplorerLoader loader)
        {
            if (Loader != null)
            {
                LogWarning("UnityExplorer is already loaded!");
                return;
            }
            Loader = loader;

            Log($"{NAME} {VERSION} initializing...");

            ExplorerBehaviour.Setup();

            if (!Directory.Exists(Loader.ExplorerFolder))
            {
                Directory.CreateDirectory(Loader.ExplorerFolder);
            }

            ConfigManager.Init(Loader.ConfigHandler);

            ReflectionUtility.Init();

            RuntimeProvider.Init();
            SceneHandler.Init();
            InputManager.Init();

            RuntimeProvider.Instance.StartCoroutine(SetupCoroutine());

            ExecuteInMain.Init();
            // ProtocolMap.Init();
            SignalMap.Init();

            TcpServerIO.Start();

            Log($"Finished core setup, waiting for UI setup...");
        }