VRChat
DigitalHeaven.Mods.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.
How It Works
Section titled “How It Works”The extension registers itself via [InitializeOnLoad] with EditorPipelineExtensionRegistry and hooks into the OnPrefabCreated event. For each avatar prefab:
- Checks if the definition is a dh.avatar (skips plain objects)
- Finds the
DigitalHeavenRigcomponent on the prefab - Reads rig data (view position, visemes, eye look, eyelids) and configures VRChat components
Generated Components
Section titled “Generated Components”VRCAvatarDescriptor
Section titled “VRCAvatarDescriptor”| Feature | Source | Description |
|---|---|---|
| View Position | viewPosition | First-person camera offset |
| Lip Sync | visemes | Viseme blendshape mapping (15 Oculus visemes) |
| Eye Look | eyeRotationLimits | Eye bone rotation limits for gaze tracking |
| Eyelids | eyelids | Eyelid 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.setRig 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).
PipelineManager
Section titled “PipelineManager”A PipelineManager component is added if not already present. This is required by the VRChat SDK for avatar uploads.
Rig Configuration
Section titled “Rig Configuration”All VRChat-specific data lives in the generic dh.rig definition — no VRChat-specific files are needed. The dh.setRig patch’s mesh property tells the system which SkinnedMeshRenderer holds the viseme and eyelid blendshapes.
{ "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" }}{ "patches": [ { "$type": "dh.importModel", "path": "models/body.glb" }, { "$type": "dh.setRig", "target": "", "path": "rigs/humanoid.dh-rig", "mesh": "Body" } ]}Prefab Variants
Section titled “Prefab Variants”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.
Platform Overrides
Section titled “Platform Overrides”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.
Requirements
Section titled “Requirements”- VRChat Avatars SDK (
com.vrchat.avatars) installed in the Unity project - DigitalHeaven.Unity.Editor set up and working
The DigitalHeaven.Mods.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.
Development
Section titled “Development”The project is at Mods/DigitalHeaven.Mods.VRChat/ in the repository.
| Target framework | netstandard2.1 |
| C# version | 13.0 (PolySharp) |
| Dependencies | DigitalHeaven.Core, DigitalHeaven.Unity, DigitalHeaven.Unity.Editor |
| VRChat references | VRCSDK3A.dll, VRCSDKBase.dll, VRCCore-Editor.dll |
VRChat SDK stub DLLs are sourced from External/Libs/VRChat/ — a local-only, git-ignored directory populated from a VRChat Avatars SDK installation.