Synced variable will be overwritten by previous owners value for some time immediately after owner changes
complete
naqtn
Test environment: VRCSDK3-UDON-2020.04.25.13.00, Client Build 921
In this test, the program will take ownership if the you aren't object owner. And immidiately after it ensured being owner, it writes synced variable only once.
If instigating player is not the owner in advance, the variable changes its value, but goes back to previous value immidiately (maybe at the next frame). The player is like being treated as non-owner, through the player is already owner at the moment.
Workaround:
Use delay timer before writing synced variable, if instigator is not object owner.
I put up more description in repro world.
Log In
Phasedragon
updated the status to
complete
This was fixed in the Udon Networking Update last year. Technically similar symptoms, but not to be confused with this newer issue that has completely different repro steps: https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/1171-deserialization-fires-for-owner-and-serialized-data-is-overridden-by-old-da
P
PileOfMeeps
I'm using a timer to delay but still getting an issue like this, where if the owner changes, then i wait for update to check the new owner, then set the value, then wait again for update to propogate the sync'd value, it will only work on the second run through of all of that.
Phasedragon
This is easily one of the top 3 reasons to find syncing difficult in udon. Very frustrating.