Class BindUdonSharpEventAttribute
- Namespace
- JLChnToZ.VRC.Foundation
Attach this attribute to a field of UdonSharpEventSender based componet to bind the event on build.
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class BindUdonSharpEventAttribute : Attribute
- Inheritance
-
BindUdonSharpEventAttribute
- Inherited Members
- Extension Methods
Remarks
This is equivalent to calling _AddListener(UdonSharpBehaviour) in runtime but done in build time.
Constructors
BindUdonSharpEventAttribute(params string[])
Bind the event sender to the target field.
public BindUdonSharpEventAttribute(params string[] bindEventNames)
Parameters
bindEventNamesstring[]The names of the events to bind. If no event names are provided, all events will be bound.
Recommended to provide event names when you have many events but only a few of them need to be listened, as this can reduce the number of events sent and improve performance.