Class CustomEvent
A special named event with any amount of parameters called manually with the 'Trigger Custom Event' unit.
Inheritance
CustomEvent
Implements
Inherited Members
Namespace: Unity.VisualScripting
Assembly: Unity.VisualScripting.Flow.dll
Syntax
[UnitCategory("Events")]
[UnitOrder(0)]
public sealed class CustomEvent : GameObjectEventUnit<CustomEventArgs>, IGraphElementWithData, IGraphEventHandler<CustomEventArgs>, IGameObjectEventUnit, IEventUnit, IUnit, IGraphElementWithDebugData, IGraphElement, IGraphItem, INotifiedCollectionItem, IDisposable, IPrewarmable, IAotStubbable, IIdentifiable, IAnalyticsIdentifiable, IGraphEventListener
Properties
MessageListenerType
Declaration
public override Type MessageListenerType { get; }
Property Value
Type | Description |
---|---|
Type |
Overrides
argumentCount
Declaration
[DoNotSerialize]
[Inspectable]
[UnitHeaderInspectable("Arguments")]
public int argumentCount { get; set; }
Property Value
Type | Description |
---|---|
int |
argumentPorts
Declaration
[DoNotSerialize]
public List<ValueOutput> argumentPorts { get; }
Property Value
Type | Description |
---|---|
List<ValueOutput> |
hookName
Declaration
protected override string hookName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
name
The name of the event.
Declaration
[DoNotSerialize]
public ValueInput name { get; }
Property Value
Type | Description |
---|---|
ValueInput |
Methods
AssignArguments(Flow, CustomEventArgs)
Declaration
protected override void AssignArguments(Flow flow, CustomEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Flow | flow | |
CustomEventArgs | args |
Overrides
Definition()
Declaration
protected override void Definition()
Overrides
ShouldTrigger(Flow, CustomEventArgs)
Declaration
protected override bool ShouldTrigger(Flow flow, CustomEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Flow | flow | |
CustomEventArgs | args |
Returns
Type | Description |
---|---|
bool |
Overrides
Trigger(GameObject, string, params object[])
Declaration
public static void Trigger(GameObject target, string name, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
GameObject | target | |
string | name | |
object[] | args |