Skip to content

DynamicPrivacy

Guribo edited this page Jul 5, 2026 · 5 revisions

DynamicPrivacy

Dynamically manages privacy channels for voice communication based on player presence. Automatically adds/removes a single privacy channel ID when the local player enters or exits the monitored area, providing seamless voice privacy control.

Important Limitation

This component listens to UdonEvents. You must wire LocalPlayerAdded and LocalPlayerRemoved events from a zone detection component (e.g., VoiceOverrideTriggerZone).

Setup

  1. Add to a GameObject
  2. Assign LocalPlayerAdded and LocalPlayerRemoved UdonEvents (typically from a trigger zone)
  3. Assign OverrideWithDynamicPrivacy — the PlayerAudioOverride whose channels will be managed
  4. Set PlayerAddedPrivacyChannelId — channel ID assigned on enter
  5. Set PlayerExitedPrivacyChannelId — channel ID assigned on exit

Settings

Setting Type Default Description
LocalPlayerAdded UdonEvent (required) Fired when local player enters the zone
LocalPlayerRemoved UdonEvent (required) Fired when local player exits the zone
OverrideWithDynamicPrivacy PlayerAudioOverride (required) Override whose privacy channels are managed
PlayerAddedPrivacyChannelId int (required) Channel ID added on enter
PlayerExitedPrivacyChannelId int (required) Channel ID added on exit

Behavior

When local player enters zone:

  1. Removes PlayerExitedPrivacyChannelId from override (cleanup)
  2. Adds PlayerAddedPrivacyChannelId to override
  3. All players sharing this channel can now hear each other

When local player exits zone:

  1. Removes PlayerAddedPrivacyChannelId from override
  2. Adds PlayerExitedPrivacyChannelId to override
  3. Voice becomes private to exit channel only

Important Limitations

  • Only manages a single PlayerAudioOverride — use multiple DynamicPrivacy components for multiple overrides
  • Two channel IDs ensure players inside and outside the zone cannot hear each other
  • Events must be wired manually — this component does not detect zones itself

See Also

Clone this wiki locally