When multiple Udon components with synced variables attach on the same child GameObject (whose parent has VRCPlayerObject and VRCEnablePersistence), Persistence only restores variables from the first Udon component.
Steps to Reproduce:
1.Create two Udon components (A and B). Each Udon component contains one synced variable.
2.Create a parent GameObject with VRCPlayerObject and VRCEnablePersistence.
3.Create a child GameObject under it and attach components A and B.
4.Run a local test with a single client.
5.Set the values of the variables in A and B using any method. For example, set A to 3 and B to 5.
6.Rejoin the instance.
7.Check the values of the restored variables using any method.
Expected Behavior:
All variables are restored to their previously set values (A is 3, B is 5).
Observed Behavior:
Only the variable in component A, which was attached first, is restored. Component B's variable is reset to its initial value. (A is 3, B is 0).
Additional Notes:
Swapping the order of components A and B on the child GameObject reverses the result (A is 0, B is 5).
This confirms that the issue is related to the component order.
SDK version is 3.8.1.
Similar issues found below, but it's unclear if they are related: