1
0

FrontWheelTrackerEditor.cs 741 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Globalization;
  3. using Tracking;
  4. using UnityEditor;
  5. using UnityEditor.Recorder.Input;
  6. using UnityEngine;
  7. [CustomEditor(typeof(FrontWheelTracker))]
  8. // ReSharper disable once CheckNamespace
  9. public class FrontWheelTrackerEditor : CalibratableTrackerEditor
  10. {
  11. private FrontWheelTracker fwt;
  12. protected override void OnEnable()
  13. {
  14. base.OnEnable();
  15. fwt = (FrontWheelTracker) tracker;
  16. }
  17. public override void OnInspectorGUI()
  18. {
  19. base.OnInspectorGUI();
  20. if (!(EditorApplication.isPlaying || EditorApplication.isPaused)) return;
  21. EditorGUILayout.LabelField("Calculated Steer Rotation",
  22. fwt.SteerRotation.ToString(CultureInfo.CurrentCulture));
  23. }
  24. }