MegaSinusCurveEditor.cs 838 B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using UnityEditor;
  3. [CanEditMultipleObjects, CustomEditor(typeof(MegaSinusCurve))]
  4. public class MegaSinusCurveEditor : MegaModifierEditor
  5. {
  6. public override string GetHelpString() { return "Sinus Curve Modifier by Unity"; }
  7. //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); }
  8. public override bool Inspector()
  9. {
  10. MegaSinusCurve mod = (MegaSinusCurve)target;
  11. #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
  12. EditorGUIUtility.LookLikeControls();
  13. #endif
  14. mod.scale = EditorGUILayout.FloatField("Scale", mod.scale);
  15. mod.speed = EditorGUILayout.FloatField("Speed", mod.speed);
  16. mod.phase = EditorGUILayout.FloatField("Phase", mod.phase);
  17. mod.animate = EditorGUILayout.Toggle("Animate", mod.animate);
  18. return false;
  19. }
  20. }