Esempio n. 1
0
        void PoolCategory()
        {
            UNEditorUtility.DrawHelpBox("Pool Management", "Here you can manage your items Pool.", false, false);

            terrain.PoolItemType = UNEditorUtility.DrawSelectionBox <System.Type>(new GUIContent("Pool Item Type : ", "What would be the type of the Pool ?"), PoolCache, PoolCache.Find(x => x.item == terrain.PoolItemType));
            terrain.PoolAmount   = EditorGUILayout.IntSlider("Pool Amount :", terrain.PoolAmount, 1, 100);

            GUILayout.Space(10);

            if (GUILayout.Button("Update Pool"))
            {
                terrain.CreatePool(terrain.PoolItemType);
            }
        }
Esempio n. 2
0
        void GridsCategory()
        {
            UNEditorUtility.DrawHelpBox("Grids Management", "Here you can manage your grids.", false, false);

            GUILayout.BeginHorizontal();
            GUILayout.Space(Screen.width / 5);

            int resolution = terrain.sectorResolution == 1 ? 300 : (300 / terrain.sectorResolution);

            UNEditorUtility.DrawGridPreview(terrain.sectorResolution, UNStandaloneUtility.GetUIIcon("Square"), resolution, resolution);

            GUILayout.EndHorizontal();

            GUILayout.Space(15);

            terrain.sectorResolution = EditorGUILayout.IntSlider(new GUIContent("Sector Resolution", "The resolution of the sector of the terrain, grids count = (resolution)^2"), terrain.sectorResolution, 1, Sector.resolutionLimit);
        }