暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

EventUnitDescriptor.cs 606B

123456789101112131415161718192021222324
  1. using System.Collections.Generic;
  2. namespace Unity.VisualScripting
  3. {
  4. [Descriptor(typeof(IEventUnit))]
  5. public class EventUnitDescriptor<TEvent> : UnitDescriptor<TEvent>
  6. where TEvent : class, IEventUnit
  7. {
  8. public EventUnitDescriptor(TEvent @event) : base(@event) { }
  9. protected override string DefinedSubtitle()
  10. {
  11. return "Event";
  12. }
  13. protected override IEnumerable<EditorTexture> DefinedIcons()
  14. {
  15. if (unit.coroutine)
  16. {
  17. yield return BoltFlow.Icons.coroutine;
  18. }
  19. }
  20. }
  21. }