No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CustomEventDescriptor.cs 681B

12345678910111213141516171819202122232425
  1. namespace Unity.VisualScripting
  2. {
  3. [Descriptor(typeof(CustomEvent))]
  4. public class CustomEventDescriptor : EventUnitDescriptor<CustomEvent>
  5. {
  6. public CustomEventDescriptor(CustomEvent @event) : base(@event) { }
  7. protected override string DefinedSubtitle()
  8. {
  9. return null;
  10. }
  11. protected override void DefinedPort(IUnitPort port, UnitPortDescription description)
  12. {
  13. base.DefinedPort(port, description);
  14. var index = unit.argumentPorts.IndexOf(port as ValueOutput);
  15. if (index >= 0)
  16. {
  17. description.label = "Arg. " + index;
  18. }
  19. }
  20. }
  21. }