20 lines
452 B
C#
20 lines
452 B
C#
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();
|
|
}
|
|
}
|
|
}
|