Skip to content

VRChat

DigitalHeaven.Games.VRChat is a Unity Editor pipeline extension that automatically adds VRChat SDK components to avatar prefabs during import. When a pallet containing avatars is imported, each avatar prefab gets a fully configured VRCAvatarDescriptor and PipelineManager — ready for upload via the VRChat SDK.

Ships as a pre-compiled DLL alongside DigitalHeaven.Unity.Editor. No source compilation required.

The extension registers itself via [InitializeOnLoad] with EditorPipelineExtensionRegistry and hooks into the OnPrefabCreated event. For each avatar prefab:

  1. Checks if the definition is a dh.avatar (skips plain objects)
  2. Finds the DigitalHeavenRig component on the prefab
  3. Reads rig data (view position, visemes, eye look, eyelids) and configures VRChat components
FeatureSourceDescription
View PositionviewPositionFirst-person camera offset
Lip SyncvisemesViseme blendshape mapping (15 Oculus visemes)
Eye LookeyeRotationLimitsEye bone rotation limits for gaze tracking
EyelidseyelidsEyelid blendshapes for blink animation

All features are optional — only the properties present in the rig definition are configured.

Lip sync is set to Viseme Blendshape mode. The VisemeSkinnedMesh is resolved from the mesh property on the dh.set-rig patch.

Eye look rotations are converted from the rig’s Euler angle limits to VRChat’s quaternion format. Both eyes use the same rotation limits (linked = true).

Eyelid blendshape names are resolved to indices on the target mesh. Omitted eyelid states resolve to index -1 (none).

A PipelineManager component is added if not already present. This is required by the VRChat SDK for avatar uploads.

All VRChat-specific data lives in the generic dh.rig definition — no VRChat-specific files are needed. The dh.set-rig patch’s mesh property tells the system which SkinnedMeshRenderer holds the viseme and eyelid blendshapes.

rigs/humanoid.dh-rig
{
"bones": { "Hips": "Hips", "Head": "Head", "LeftEye": "LeftEye", "..." : "..." },
"viewPosition": [0, 1.32, 0.07],
"eyeRotationLimits": {
"up": [12, 0, 0],
"down": [-12, 0, 0],
"left": [0, -12, 0],
"right": [0, 12, 0]
},
"visemes": {
"sil": "vrc.v_sil", "PP": "vrc.v_PP", "FF": "vrc.v_FF",
"TH": "vrc.v_TH", "DD": "vrc.v_DD", "kk": "vrc.v_kk",
"CH": "vrc.v_CH", "SS": "vrc.v_SS", "nn": "vrc.v_nn",
"RR": "vrc.v_RR", "aa": "vrc.v_aa", "E": "vrc.v_E",
"ih": "vrc.v_ih", "oh": "vrc.v_oh", "ou": "vrc.v_ou"
},
"eyelids": {
"lookUp": "Eye Look Up",
"lookDown": "Eye Look Down"
}
}
avatar.dh-avatar
{
"patches": [
{ "$type": "dh.import-model", "path": "models/body.glb" },
{
"$type": "dh.set-rig",
"target": "",
"path": "rigs/humanoid.dh-rig",
"mesh": "Body"
}
]
}

For avatars that inherit from a base avatar, the parent’s VRChat components are already present on the prefab variant. The extension uses a get-or-add pattern — it finds the existing VRCAvatarDescriptor and updates it with the child’s rig data rather than adding a duplicate.

The extension registers platforms/vrchat/ as a platform override path. You can place VRChat-specific material overrides in this directory to use different shaders or properties when importing for VRChat.

The DigitalHeaven.Games.VRChat.dll automatically deploys to Assets/Plugins/DigitalHeaven/Editor/ alongside the editor DLL. The extension activates automatically when both the VRChat SDK and the DH editor plugin are present.

The project is at Games/DigitalHeaven.Games.VRChat/ in the repository.

Target frameworknetstandard2.1
C# version13.0 (PolySharp)
DependenciesDigitalHeaven.Core, DigitalHeaven.Unity, DigitalHeaven.Unity.Editor
VRChat referencesVRCSDK3A.dll, VRCSDKBase.dll, VRCCore-Editor.dll

VRChat SDK stub DLLs are sourced from ExternalLibs/VRChat/ — a local-only, git-ignored directory populated from a VRChat Avatars SDK installation.