blob: 6ed28216e0d1399bfa3bb6a5bc9ce2d2568d2b48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using UnityEditor;
using UnityEngine;
namespace Pathfinding {
[CustomEditor(typeof(AILerp), true)]
[CanEditMultipleObjects]
public class AILerpEditor : BaseAIEditor {
protected override void Inspector () {
Section("Pathfinding");
AutoRepathInspector();
Section("Movement");
FloatField("speed", min: 0f);
PropertyField("canMove");
if (PropertyField("enableRotation")) {
EditorGUI.indentLevel++;
Popup("orientation", new [] { new GUIContent("ZAxisForward (for 3D games)"), new GUIContent("YAxisForward (for 2D games)") });
FloatField("rotationSpeed", min: 0f);
EditorGUI.indentLevel--;
}
if (PropertyField("interpolatePathSwitches")) {
EditorGUI.indentLevel++;
FloatField("switchPathInterpolationSpeed", min: 0f);
EditorGUI.indentLevel--;
}
DebugInspector();
}
}
}
|