示例#1
0
        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());
        }
示例#2
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...");
        }