MegaSpherifyWarpEditor.cs 873 B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. using UnityEditor;
  3. [CanEditMultipleObjects, CustomEditor(typeof(MegaSpherifyWarp))]
  4. public class MegaSpherifyWarpEditor : MegaWarpEditor
  5. {
  6. [MenuItem("GameObject/Create Other/MegaFiers/Warps/Spherify")]
  7. static void CreateStarShape() { CreateWarp("Spherify", typeof(MegaSpherifyWarp)); }
  8. public override string GetHelpString() { return "Spherify Warp Modifier by Chris West"; }
  9. //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("bend_help.png"); }
  10. public override bool Inspector()
  11. {
  12. MegaSpherifyWarp mod = (MegaSpherifyWarp)target;
  13. #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
  14. EditorGUIUtility.LookLikeControls();
  15. #endif
  16. mod.percent = EditorGUILayout.FloatField("Percent", mod.percent);
  17. mod.FallOff = EditorGUILayout.FloatField("FallOff", mod.FallOff);
  18. return false;
  19. }
  20. }