SwingDataDrawer.cs 621 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using UnityEditor;
  3. namespace HQFPSWeapons
  4. {
  5. [CustomPropertyDrawer(typeof(MeleeWeapon.SwingData))]
  6. public class SwingDataDrawer : CopyPasteBase<MeleeWeapon.SwingData>
  7. {
  8. private const string menuName = "Swing Data";
  9. [MenuItem("CONTEXT/" + menuName + "/Copy " + menuName)]
  10. private static void Copy()
  11. {
  12. DoCopy();
  13. }
  14. [MenuItem("CONTEXT/" + menuName + "/Paste " + menuName)]
  15. private static void Paste()
  16. {
  17. DoPaste();
  18. }
  19. public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
  20. {
  21. base.OnGUI(position, property, label, menuName);
  22. }
  23. }
  24. }