Singularity/Library/PackageCache/com.unity.visualscripting@1.../Editor/VisualScripting.Flow/Events/TriggerCustomEventDescripto...

21 lines
610 B
C#
Raw Normal View History

2024-05-06 14:45:45 -04:00
namespace Unity.VisualScripting
{
[Descriptor(typeof(TriggerCustomEvent))]
public class TriggerCustomEventDescriptor : UnitDescriptor<TriggerCustomEvent>
{
public TriggerCustomEventDescriptor(TriggerCustomEvent trigger) : base(trigger) { }
protected override void DefinedPort(IUnitPort port, UnitPortDescription description)
{
base.DefinedPort(port, description);
var index = unit.arguments.IndexOf(port as ValueInput);
if (index >= 0)
{
description.label = "Arg. " + index;
}
}
}
}