MegaTreeBendEditor.cs 866 B

123456789101112131415161718192021222324
  1. using UnityEngine;
  2. using UnityEditor;
  3. [CanEditMultipleObjects, CustomEditor(typeof(MegaTreeBend))]
  4. public class MegaTreeBendEditor : MegaModifierEditor
  5. {
  6. public override string GetHelpString() { return "Tree Bend Modifier by Chris West"; }
  7. public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); }
  8. public override bool Inspector()
  9. {
  10. MegaTreeBend mod = (MegaTreeBend)target;
  11. #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
  12. EditorGUIUtility.LookLikeControls();
  13. #endif
  14. mod.fBendScale = EditorGUILayout.FloatField("Bend Scale", mod.fBendScale);
  15. //mod.vWind = EditorGUILayout.Vector3Field("Wind", mod.vWind);
  16. mod.WindDir = EditorGUILayout.FloatField("Wind Dir", mod.WindDir);
  17. mod.WindSpeed = EditorGUILayout.FloatField("Wind Speed", mod.WindSpeed);
  18. return false;
  19. }
  20. }