Unity属性面板扩展

CustomMethodDrawerAttribute.cs 462B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using UnityEngine;
  6. namespace TModule.Editor
  7. {
  8. [Conditional("UNITY_EDITOR")]
  9. [AttributeUsage(AttributeTargets.Class,AllowMultiple =false)]
  10. public class CustomMethodDrawerAttribute : Attribute
  11. {
  12. public Type AttributeType;
  13. public CustomMethodDrawerAttribute(Type type)
  14. {
  15. AttributeType = type;
  16. }
  17. }
  18. }