Unity属性面板扩展

TCustomPropertyDrawer.cs 488B

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