Skip to content

VoiceOverrideRoom

Guribo edited this page Jul 16, 2021 · 1 revision

VoiceOverrideRoom

Assets/Guribo/UdonBetterAudio/Runtime/Examples/VoiceOverrideRoom.cs

Synchronizes which players are affected by a given BetterPlayerAudioOverride.

Overview

The UdonSharpbehaviour VoiceOverrideRoom is a component which

  • keeps track of players being added/removed from a given BetterPlayerAudioOverride component
  • sends the updated player list to all other players when it changes
  • adds/removes the local player to/from the list of affected players when it receives an out-of-date player list and sends it again to other players
    • this happens every time more than one player exits or enters at the roughly the same time due to ownership transfer races
  • (optionally) removes and teleports the player from the BetterPlayerAudioOverride on respawn
  • can have all entries/exits covered with either
    • VoiceOverrideRoomEnter-/-ExitButton
    • VoiceOverrideDoors
    • a mix of both
    • None
      • Important: Use this option only when the room is designed to be entered by teleportation without "physical" exit.
        Otherwise it may be possible to "physically" leave the room but still being affected by the BetterPlayerAudioOverride.