Files

25 lines
626 B
C#
Raw Permalink Normal View History

2026-01-08 16:50:20 +00:00
using UnityEditor;
namespace Unity.Splines.Examples.Editor
{
[CustomEditor(typeof(LoftRoadBehaviour))]
[CanEditMultipleObjects]
class SplineWidthEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
EditorGUI.BeginChangeCheck();
base.OnInspectorGUI();
if (EditorGUI.EndChangeCheck())
{
EditorApplication.delayCall += () =>
{
foreach (var target in targets)
((LoftRoadBehaviour)target).LoftAllRoads();
};
}
}
}
}