MegaCrumpleEditor.cs 704 B

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