MegaBubbleWarpEditor.cs 865 B

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