12345678910111213141516171819202122232425 |
- using UnityEngine;
- using UnityEditor;
- [CanEditMultipleObjects, CustomEditor(typeof(MegaSinusCurve))]
- public class MegaSinusCurveEditor : MegaModifierEditor
- {
- public override string GetHelpString() { return "Sinus Curve Modifier by Unity"; }
- //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); }
- public override bool Inspector()
- {
- MegaSinusCurve mod = (MegaSinusCurve)target;
- #if !UNITY_5 && !UNITY_2017 && !UNITY_2018 && !UNITY_2019 && !UNITY_2020
- EditorGUIUtility.LookLikeControls();
- #endif
- mod.scale = EditorGUILayout.FloatField("Scale", mod.scale);
- mod.speed = EditorGUILayout.FloatField("Speed", mod.speed);
- mod.phase = EditorGUILayout.FloatField("Phase", mod.phase);
- mod.animate = EditorGUILayout.Toggle("Animate", mod.animate);
- return false;
- }
- }
|