Пример #1
0
        public static int CurrentLightmap = 0;           //Lightmap Index Count

        void Start()
        {
            if (!LoadMDL && LoadMap)
            {
                BspLoader.Load(LevelName);
            }
            else if (LoadMDL && !LoadMap)
            {
                StudioMDLLoader.Load(ModelName);
            }
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            GUILayout.Box(ConfigLoader.BSPPath);

            if (GUILayout.Button("Load Source BSP"))
            {
                BspLoader.Load(ConfigLoader.LevelName);
            }

            GUILayout.Space(5);

            if (GUILayout.Button("Show/Hide Brushes"))
            {
                for (Int32 i = 0; i < BspLoader.BSP_Brushes.Count; i++)
                {
                    BspLoader.BSP_Brushes[i].GetComponent <Renderer>().enabled =
                        !BspLoader.BSP_Brushes[i].GetComponent <Renderer>().enabled;
                }
            }

            if (GUILayout.Button("Remove loaded objects in the scene"))
            {
                UnityEngine.Object.DestroyImmediate(BspLoader.BSP_WorldSpawn);
                RenderSettings.skybox = null;

                Debug.LogWarning("You need to restart the editor to free up RAM. TODO: need to fix that :D");
            }

            GUILayout.Space(10);
            //GUILayout.Box(ConfigLoader.VPKPath);
            GUILayout.Box(ConfigLoader.MDLPath);
            if (GUILayout.Button("Load Studio Model"))
            {
                StudioMDLLoader.Load(ConfigLoader.ModelName);
            }
        }