AILerpEditor.cs 680 B

123456789101112131415161718192021222324252627
  1. using UnityEditor;
  2. using UnityEngine;
  3. namespace Pathfinding {
  4. [CustomEditor(typeof(AILerp), true)]
  5. [CanEditMultipleObjects]
  6. public class AILerpEditor : EditorBase {
  7. protected override void Inspector () {
  8. PropertyField("speed");
  9. PropertyField("repathRate");
  10. PropertyField("canSearch");
  11. PropertyField("canMove");
  12. if (PropertyField("enableRotation")) {
  13. EditorGUI.indentLevel++;
  14. PropertyField("rotationSpeed");
  15. PropertyField("rotationIn2D");
  16. EditorGUI.indentLevel--;
  17. }
  18. if (PropertyField("interpolatePathSwitches")) {
  19. EditorGUI.indentLevel++;
  20. PropertyField("switchPathInterpolationSpeed");
  21. EditorGUI.indentLevel--;
  22. }
  23. }
  24. }
  25. }