MegaWavingWarpEditor.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. using UnityEditor;
  3. [CanEditMultipleObjects, CustomEditor(typeof(MegaWavingWarp))]
  4. public class MegaWavingWarpEditor : MegaWarpEditor
  5. {
  6. [MenuItem("GameObject/Create Other/MegaFiers/Warps/Waving")]
  7. static void CreateStarShape() { CreateWarp("Waving", typeof(MegaWavingWarp)); }
  8. public override string GetHelpString() { return "Waving Warp Modifier by Chris West"; }
  9. public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); }
  10. public override bool Inspector()
  11. {
  12. MegaWavingWarp mod = (MegaWavingWarp)target;
  13. #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
  14. EditorGUIUtility.LookLikeControls();
  15. #endif
  16. mod.amp = EditorGUILayout.FloatField("Amp", mod.amp * 100.0f) * 0.01f;
  17. mod.wave = EditorGUILayout.FloatField("Wave", mod.wave);
  18. mod.phase = EditorGUILayout.FloatField("Phase", mod.phase);
  19. mod.Decay = EditorGUILayout.FloatField("Decay", mod.Decay);
  20. mod.animate = EditorGUILayout.Toggle("Animate", mod.animate);
  21. mod.Speed = EditorGUILayout.FloatField("Speed", mod.Speed);
  22. mod.waveaxis = (MegaAxis)EditorGUILayout.EnumPopup("Axis", mod.waveaxis);
  23. return false;
  24. }
  25. }