[1533] Any VRCPlayerApi variable that was set to a leaving player is replaced with another player present in the instance (or perhaps to the instance owner/local player)
available in future release
GigiSpahz
After the 2024.4.1 patch, I've noticed that the VRCPlayerApi variable inside Udon scripts will automatically replace itself with another player (or the instance owner/local player) if the player it was set to leaves the world.
I am unsure if this was an intended change, but I am fairly certain that worlds scripting that relied on knowing if the variable is equals to the player that left now no longer behave as intended after this patch since it always switches to players that are still present.
Log In
_
_tau_
For due diligence, this _should_ be fixed in 2024.4.1p1, build 1534, which just shipped. Can you confirm?
This post was marked as
available in future release
GigiSpahz
I did a couple of test to see if the issue is fixed, and I can confirm the VRCPlayerApi variable remains unchanged after the player set to that variable leaves.
I think it would be wise to wait and see if the issue is also fixed for other users before completely closing the issue.
I would also like to give a reminder that for anyone that uses CyanPlayerObjectPool, the prefab will clear the Owner variable shortly after the assigned player leaves on cleanup, so if you still need the variable for anything, make sure to set a copy of it on a separate variable.