Firstborn/Library/PackageCache/com.unity.terrain-tools@4.0.5/Editor/TerrainToolbox/TerrainGroupInspector.cs

21 lines
555 B
C#
Raw Normal View History

2023-03-28 13:24:16 -04:00
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(TerrainGroup))]
internal class TerrainGroupInspector : Editor
{
Terrain[] childTerrains;
public override void OnInspectorGUI()
{
TerrainGroup groupTarget = (TerrainGroup)target;
EditorGUILayout.Separator();
groupTarget.GroupID = EditorGUILayout.IntField("Group ID", groupTarget.GroupID);
EditorGUILayout.Separator();
if (GUILayout.Button("Update Child Terrains"))
{
groupTarget.UpdateChildTerrains();
}
}
}