WuhuIslandTesting/Library/PackageCache/com.unity.splines@1.0.1/Samples~/Editor/LoftRoadEditor.cs

21 lines
452 B
C#
Raw Normal View History

2025-01-07 02:06:59 +01:00
using System;
using UnityEditor;
using UnityEngine;
namespace Unity.Splines.Examples.Editor
{
[CustomEditor(typeof(LoftRoadBehaviour))]
class RoadTool : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
EditorGUI.BeginChangeCheck();
base.OnInspectorGUI();
if (EditorGUI.EndChangeCheck())
((LoftRoadBehaviour)target).Loft();
}
}
}