World Utilities / Utilities
Event Broadcaster
Calls a list of Udon events with a single call - optionally delayed by frames or seconds.
since v0.7.0
| Component | Add Component menu / prefab | Source |
|---|---|---|
Event BroadcasterVRCTools.World.Utils.EventBroadcaster
|
Utilities › Event Broadcaster
|
EventBroadcaster.cs ↗ |
Unity UI buttons, interact triggers and other components can usually call only a limited set of events, and offer no
delay. The Event Broadcaster bundles any number of event calls behind a single _Trigger(), optionally after a delay.
Parameters
| Section | Parameter | Default | Description |
|---|---|---|---|
| Targets | Events | empty | Behaviour + event name pairs called on _Trigger(), in order. |
| Delay | Delay Mode | NONE |
NONE, FRAMES or SECONDS. |
| Delay Frames | 0 |
Frames to wait before calling the events (FRAMES). |
|
| Delay Seconds | 0 |
Seconds to wait before calling the events (SECONDS). |
|
| Delay Timing | Update |
When delayed events are executed: Update or LateUpdate. |
Event names must refer to public methods. Invalid entries are skipped and logged.
Functions
| Function | Description |
|---|---|
_Trigger() |
Calls all configured events (after the delay). |
Usage
A “reset room” button that restores several values at once:
- Add an
Event Broadcasterand list_Reseton each local value (and_Applyon any presets) you want to restore. - Point the button’s On Click at the broadcaster:
SendCustomEvent("_Trigger").
A delay of one frame is useful when the events depend on state that is updated by the same click.