Common Library

VRCTCommon v0.3.1

✨ Added

  • UdonDebug writes log messages prefixed with the type and object name of the behaviour that wrote them. In the editor, both names are color coded
  • IsLocallyOwned(), HasOwnership(player), SetOwnership(player) and TakeOwnership() extension methods for GameObject and UdonSharpBehaviour. The behaviour variants return false or do nothing when the behaviour has already been destroyed
  • [EventHook] marks overridable hooks with an empty body. Overrides do not need to call the base implementation
  • [MustCallBase] marks methods whose overrides must call the base implementation
  • [CustomEvent] marks methods invoked via SendCustomEvent or SendCustomEventDelayedSeconds
  • [NetworkEvent] marks methods invoked via SendCustomNetworkEvent
  • The editor now checks these attributes whenever scripts are reloaded and logs a warning for every violation. Clicking a warning selects the offending script
  • AbstractSynchronizedBehaviour: Start, Update, OnPlayerJoined, OnPlayerLeft, OnOwnershipTransferred, OnPostSerialization and OnDeserialization are now marked [MustCallBase], and _OnStateInitialized() is marked [EventHook]

🔧 Changed

  • VRChat Worlds SDK 3.8.1 or newer is now required
  • AbstractSynchronizedBehaviour.StateInitialized has been renamed to IsStateInitialized and is now public - see state initialization
  • AbstractSynchronizedBehaviour.OnStateInitialized() has been renamed to _OnStateInitialized(). Overrides using the old name no longer compile
  • Subclasses of AbstractSynchronizedBehaviour now always use manual synchronization unless they declare their own [UdonBehaviourSyncMode]
  • AbstractSynchronizedBehaviour now writes its log messages via UdonDebug

🐞 Fixed

📚 Documentation

  • _OnStateInitialized() now explains when it is invoked
  • The contribution guidelines now describe the package’s code conventions