Event System

Changelog

Release history of the Event System, newest first.

v0.4.1 2026-10-20

🐞 Fixed

  • AbstractSynchronizedEventEmitter failed to compile. In both emitters, the internal _LogInfo, _LogWarn and _LogError methods have been renamed to _LogEmitterInfo, _LogEmitterWarn and _LogEmitterError. AbstractSynchronizedBehaviour, the base class of AbstractSynchronizedEventEmitter, already defines methods with these names, and Udon# does not support hiding methods

v0.4.0 2026-10-20

✨ Added

  • AbstractEventEmitter and AbstractSynchronizedEventEmitter now have an eventEmitterDebugging option. When it is turned on, the emitter writes handler registrations, unregistrations, stale handler cleanup and every emission (including each handler call and the current nesting depth) to the game log

🔧 Changed

  • io.vrctools.common 0.3.1 or newer is now required
  • com.vrchat.worlds 3.8.1 or newer is now required
  • Log messages are now written through UdonDebug and start with the emitter’s type and object name instead of [Event Emitter]. In the editor, these names are color coded
  • _UnregisterHandler(eventId, handler, eventName) now logs an error when there is no matching registration, instead of doing nothing
  • The samples assembly is no longer automatically referenced by other assemblies in the project
  • The example receiver’s handler function is now marked with [CustomEvent]

🐞 Fixed

  • Emitting an event from within a handler function could break the outer emission, causing its remaining handlers to be skipped or invoked incorrectly (_EmitEvent is now marked [RecursiveMethod])

📚 Documentation

  • The README examples now mark handler functions with [CustomEvent] from io.vrctools.common

v0.3.0 2026-10-18

🔧 Changed

  • io.vrctools.common 0.2.1 or newer is now required
  • Handlers can no longer be unregistered while the emitter is invoking handlers (e.g. from within a handler function). Such calls are now rejected with an error, the same as registrations already were - see rules & gotchas
  • _CleanupHandlers() now does nothing and logs an error when called while the emitter is invoking handlers

🐞 Fixed

  • After a destroyed handler was removed, the remaining handlers for that event could be invoked with the wrong event name
  • Registering or unregistering a handler from within a handler function could cause other handlers to be skipped or invoked twice
  • A destroyed handler halted the emitter the next time the event was emitted, instead of being skipped with a warning
  • _UnregisterHandler(handler): removed handlers left empty entries behind, so the handler lists only ever grew
  • _UnregisterHandler(handler): calling it before any handler had been registered threw an exception
  • _UnregisterHandler(eventId, handler, eventName): the last handler registered for the event was also removed, unless the removed handler was the last one (fixed in io.vrctools.common 0.2.1)
  • Handler lists are no longer copied on every registration and unregistration when there is nothing to clean up

📚 Documentation

  • AbstractSynchronizedEventEmitter now explains that events are only delivered on the local client, and that subclasses must call the base implementation of every lifecycle method they override
  • The README examples now compile, use the correct names and check that the emitter still exists before unregistering in OnDestroy
  • The README now explains that handlers cannot be registered or unregistered while the emitter is invoking handlers
  • _UnregisterHandler(eventId, handler, eventName) and _EmitEvent now document their parameters

v0.2.0 2026-03-17

✨ Added

  • AbstractSynchronizedEventEmitter, an event emitter for synchronized behaviours built on AbstractSynchronizedBehaviour from io.vrctools.common

🔧 Changed

  • io.vrctools.common 0.1.0 or newer is now required
  • The internal array helpers were replaced by ArrayUtils from io.vrctools.common

v0.1.1 2025-08-27

🔧 Changed

  • The com.vrchat.worlds dependency is now declared as a version range (^3.7.0) instead of an exact version

🐞 Fixed

  • Creator Companion did not resolve the package’s dependencies, as they were declared as dependencies instead of vpmDependencies

v0.1.0 2025-01-25

✨ Added

  • Initial release
  • AbstractEventEmitter, a base class for behaviours which emit events to dynamically registered handlers
  • Sample emitter, receiver and scene