Rasagar/Library/PackageCache/com.unity.terrain-tools/Editor/TerrainToolbox/TerrainGroupInspector.cs
2024-08-26 23:07:20 +03:00

21 lines
555 B
C#

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();
}
}
}