Common Library

Common Library

io.vrctools.common - shared building blocks for UdonSharp scripts used throughout the VRCTools packages.

The Common Library collects scripting helpers that several VRCTools packages need: a base class for reliably synchronized behaviours, logging and ownership helpers, a handful of array and animator utilities and attributes which the editor checks for common scripting mistakes. It contains no components you would place in a scene yourself.

You rarely install this package yourself. It is a dependency of World Utilities and the Event System and is installed automatically by Creator Companion. It is documented here for script authors who want to build on the same foundations.

Requirements

Package Version Description
com.vrchat.worlds ^3.8.1 VRChat Worlds SDK

Before v0.3.1, VRChat Worlds SDK 3.7.0 or newer is sufficient.

Contents

Type Namespace Purpose
AbstractSynchronizedBehaviour VRCTools.Common.Network Base class for manually synced behaviours with retries & late joiner support
UdonDebug VRCTools.Common.Utils Log messages prefixed with the behaviour that wrote them
GameObjectExtensions, UdonSharpBehaviourExtensions VRCTools.Common.Utils Check, set and take ownership
ArrayUtils VRCTools.Common.Utils Find, append and remove array elements in Udon
AnimatorUtilities VRCTools.Common.Utils Resolve animator parameter names to ids
[EventHook], [MustCallBase], [CustomEvent], [NetworkEvent] VRCTools.Common.Attributes Document intent; checked by the editor

Using it from your scripts

All types live in the VRCTools.Common assembly definition. Scripts in the default Assembly-CSharp can use them right away; scripts inside your own assembly definition need a reference to VRCTools.Common.

using VRCTools.Common.Attributes;
using VRCTools.Common.Network;
using VRCTools.Common.Utils;

The attribute checks live in the editor only VRCTools.Common.Editor assembly. You do not need to reference it - it runs on its own.

Changelog

See the release history.