Calling .SetAvatarAudioFarRadius(0) in OnPlayerJoined() cannot be restored later
Reimajo
If an avatar of a remote user is muted by calling VRCPlayerApi.SetAvatarAudioFarRadius(0) during OnPlayerJoined(), you cannot restore that avatar audio later by calling VRCPlayerApi.SetAvatarAudioFarRadius(40) under certain conditions. The avatar audio stays muted for you. The remote user can even disable and enable the audio toggle again, but it will still not be audible to you.
Contrary to that, if the user joins and you don't call .SetAvatarAudioFarRadius(0) during OnPlayerJoined(), you can always toggle their audio on and off later without any issues.
The issue also depends on the avatar setup:
- if the avatar audio is manually toggled via an animation after joining the world (e.g. a VRCFury toggle), the audio will never play, even if that animation is toggled again after unmuting the avatar.
- if the avatar audio is always-on, the audio behaves as expected, there is no issue.
Avatars for testing:
(VRCFury toggle) -> Bug happens
(OnLoad audio) -> Works fine
World for testing:
Attached is the only script that is in the world and a screenshot of the decompiled VRCFury toggle.
How to replicate:
- Join the world https://vrchat.com/home/world/wrld_717f7988-3503-4616-90b5-9d492d043b87/info
- Let a remote user with that avatar join (https://vrchat.com/home/avatar/avtr_8897aa55-4877-4aac-bac2-1e3280e950f4)
- Let that user toggle their avatar audio on (via the expression menu)
- confirm that you can toggle their audio on/off with the button in the world
- toggle their avatar audio off with the button in the world
- let them rejoin
- let them toggle their avatar audio on (via the expression menu)
- confirm that you cannot hear their audio if you click the button in the world
- confirm that you cannot hear their audio, even if they toggle it off and on again (via the expression menu)
Photo Viewer
View photos in a modal
Log In