Exemplo n.º 1
0
        public void SaveConfig()
        {
            CheckBasePath();

            ModFileIO.SaveConfig(modGroup.FullBasePath, mod, "Mod");
            ModFileIO.SaveConfig(modGroup.FullBasePath, arenaMod, "ArenaMod");
        }
Exemplo n.º 2
0
        public void LoadTextures(Material moddableSkybox, bool useCache)
        {
            ModGroup activeMod = ArenaModController.Instance.modGroup;

            if (!string.IsNullOrEmpty(skyboxTexture))
            {
                Texture2D skyboxTexture2D
                    = ModFileIO.LoadTexture(activeMod.FullBasePath, skyboxTexture, useCache, true);

                SkyboxMaterial = new Material(moddableSkybox);
                SkyboxMaterial.SetTexture("_MainTex", skyboxTexture2D);
                SkyboxMaterial.name = skyboxTexture;
            }
        }
Exemplo n.º 3
0
        public void LoadTextures()
        {
            ModGroup activeModGroup = ArenaModController.Instance.modGroup;
            Mod      activeMod      = ArenaModController.Instance.mod;

            foreach (TunnelState state in States)
            {
                foreach (TunnelLayer layer in state.Layers)
                {
                    if (!string.IsNullOrEmpty(layer.texture))
                    {
                        layer.Texture =
                            ModFileIO.LoadTexture(
                                activeModGroup.FullBasePath,
                                layer.texture,
                                activeMod.useCache);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public void SaveActiveModConfig()
        {
            string path = $"{DefaultPathForMods}/ModGroup.json";

            ModFileIO.SaveConfig(modGroup.FullBasePath, modGroup, path, true);
        }