Skip to content

Tutorial #2 Setting up private voice channels

Guribo edited this page Jul 11, 2026 · 4 revisions

Tutorial #2: Private Voice Channels

Overview

This tutorial walks through setting up private voice channels. Players in one room cannot hear players in another room.

You will learn how to:

  1. Set up the base scene
  2. Create two private rooms with isolated channels
  3. Test with multiple players

Prerequisites


1. Set Up the Base Scene

  1. Create a new Unity scene

  2. Add TLP_Essentials prefab:

    • Search TLP_ in Project window → filter In Packages
    • Drag TLP_Essentials into hierarchy
    • Path: Packages/tlp.udonutils/Runtime/Prefabs/TLP_Essentials.prefab
  3. Add TLP_PlayerAudioController prefab:

    • From same search results, drag TLP_PlayerAudioController into hierarchy
    • Path: Packages/tlp.udonvoiceutils/Runtime/Prefabs/Core/TLP_PlayerAudioController.prefab

2. Create Room A

  1. Drag the VoiceOverrideTriggerZone prefab into your scene:

    • Path: Packages/tlp.udonvoiceutils/Runtime/Prefabs/Examples/VoiceOverrideTriggerZone.prefab
    • This prefab already contains everything on one GameObject:
      • BoxCollider (trigger)
      • VoiceOverrideTriggerZone script (handles player enter/exit)
      • PlayerAudioOverride component
      • Canvas with label showing channel info
      • MeshFilter + MeshRenderer (visible room volume — can be hidden)
  2. Select the VoiceOverrideTriggerZone in hierarchy

  3. Find the PlayerAudioOverride component in the Inspector

  4. In Privacy Settings, set Privacy Channel Id to 1

    • This makes it a private channel (ID 1)

Tip: The prefab comes with a visible mesh and UI label for debugging. To hide them:

  • Disable the Mesh Renderer component to make the trigger invisible
  • Disable the Canvas GameObject to hide the channel info text
  • The trigger still works — only the visuals are hidden

3. Create Room B

  1. Duplicate the VoiceOverrideTriggerZone (Ctrl+D)
  2. Move it to the side (e.g., 10 units on X)
  3. Select the duplicate
  4. Find the PlayerAudioOverride component
  5. Change Privacy Channel Id to 2
    • Different ID = different channel (Room A players can't hear Room B)

4. Test

  1. Build and test with 2 VRChat instances
  2. One player joins channel 1, another joins channel 2
  3. Players in different channels cannot hear each other

How It Works

The VoiceOverrideTriggerZone prefab combines everything on one GameObject:

VoiceOverrideTriggerZone
├─ BoxCollider (IsTrigger)
├─ VoiceOverrideTriggerZone script
│   └─ OnPlayerTriggerEnter → AddPlayer to override
│   └─ OnPlayerTriggerExit → RemovePlayer from override
├─ PlayerAudioOverride
│   └─ PrivacyChannelId = channel number
│   └─ MuteOutsiders = true
└─ Canvas (label showing channel info)

When a player enters the trigger:

  1. VoiceOverrideTriggerZone calls AddPlayer on PlayerAudioOverride
  2. PlayerAudioOverride assigns the player to the channel
  3. PlayerAudioController mutes audio from players in other channels

See Private Voice Channels for full reference.

See Also

Clone this wiki locally