MegaSinusCurveWarpEditor.cs 1.0 KB

12345678910111213141516171819202122232425262728
  1. using UnityEngine;
  2. using UnityEditor;
  3. [CanEditMultipleObjects, CustomEditor(typeof(MegaSinusCurveWarp))]
  4. public class MegaSinusCurveWarpEditor : MegaWarpEditor
  5. {
  6. [MenuItem("GameObject/Create Other/MegaFiers/Warps/Sinus Curve")]
  7. static void CreateStarShape() { CreateWarp("Sinus", typeof(MegaSinusCurveWarp)); }
  8. public override string GetHelpString() { return "Sinus Curve Warp Modifier by Unity"; }
  9. //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); }
  10. public override bool Inspector()
  11. {
  12. MegaSinusCurveWarp mod = (MegaSinusCurveWarp)target;
  13. #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
  14. EditorGUIUtility.LookLikeControls();
  15. #endif
  16. mod.scale = EditorGUILayout.FloatField("Scale", mod.scale);
  17. mod.wave = EditorGUILayout.FloatField("Wave", mod.wave);
  18. mod.speed = EditorGUILayout.FloatField("Speed", mod.speed);
  19. mod.phase = EditorGUILayout.FloatField("Phase", mod.phase);
  20. mod.animate = EditorGUILayout.Toggle("Animate", mod.animate);
  21. return false;
  22. }
  23. }