Event System

VRCTEvent v0.4.0

✨ 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