Beispiel #1
0
        public static void Create()
        {
            if (doesInstanceExist)
            {
                return;
            }

            GameObject newObject = new GameObject {
                name = "Necropolis Mod Manager"
            };

            try {
                newObject.AddComponent <DiscordManager>();
                multiplayerManager = newObject.AddComponent <ATMultiplayerManager>();

                NecroHooks.postNetworkSetup += multiplayerManager.Init;

                newObject.AddComponent <ATAPIManager>();
            } catch (System.Exception e) {
                Debug.LogError(e);
            }

            DontDestroyOnLoad(newObject);

            //Patch all CSV's.
            CSVPatcher.PatchCSVs();

            //Load DLL mods.
            ATModManager.LoadMods();
        }
        public static void Create()
        {
            if (doesInstanceExist)
            {
                return;
            }

            GameObject newObject = new GameObject {
                name = "Necropolis Mod Manager"
            };

            try {
                newObject.AddComponent <DiscordManager>();
                multiplayerManager = newObject.AddComponent <ATMultiplayerManager>();

                NecroHooks.postNetworkSetup += multiplayerManager.Init;

                newObject.AddComponent <ATAPIManager>();
            } catch (System.Exception e) {
                Debug.LogError(e);
            }

            DontDestroyOnLoad(newObject);

            //Import Asset Bundles
            //AssetImporting.Import();

            /*
             * var myLoadedAssetBundle = AssetBundle.LoadFromFile(Path.Combine(Application.streamingAssetsPath, "AssetBundles/Windows/starwars"));
             * myLoadedAssetBundle.Unload(false);
             *
             * try
             * {
             *  PrefabManifest
             *  LazySingletonBehavior<patch_PrefabManager>.Instance.CachePrefabProxy<GameObject>("eq-weapon-shortsword-bb8", myLoadedAssetBundle.LoadAsset<GameObject>("eq-weapon-shortsword-bb8"));
             * }
             * catch(Exception e)
             * {
             *  Debug.Log("MODDED ASSET BUNDLE FAILED- " + e);
             * }
             */
            //Patch all CSV's.
            CSVPatcher.PatchCSVs();

            //Load DLL mods.
            // ATModManager.LoadMods();
        }