File size: 681 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace Unity.VisualScripting
{
    [Descriptor(typeof(CustomEvent))]
    public class CustomEventDescriptor : EventUnitDescriptor<CustomEvent>
    {
        public CustomEventDescriptor(CustomEvent @event) : base(@event) { }

        protected override string DefinedSubtitle()
        {
            return null;
        }

        protected override void DefinedPort(IUnitPort port, UnitPortDescription description)
        {
            base.DefinedPort(port, description);

            var index = unit.argumentPorts.IndexOf(port as ValueOutput);

            if (index >= 0)
            {
                description.label = "Arg. " + index;
            }
        }
    }
}