On Later-Joiner's client, synced variables can be changed and OnVariableChanged will be fired without
OnDeserialization()
before
Start()
at the specific situation. Then usual
OnDeserialization()
will fire that causes desynchronization between the object owner.
The specific situation is: The Owner uses
RequestSerialization()
at
OnPlayerJoined()
or within some frames later, and The Later-Joiner is the first instance in its client.
(otherwise, it won't happened)
It can be critical problem because it makes
Start()
is not be guaranteed before any Udon events: firing
OnVariableChanged
before
Start()
can break Udons that implementing initialization at
Start()
.
----
I've created the world for reproduction. Tested on local build, but couldn't test for remote.
World Mechanics: Front UI is main console. Joining a player increases synced int.
Sync timing is different between 4 consoles. (upper-left: Nothing, upper-right: Start only, lower-left: OnPlayerJoined only, lower-right: Both)
----
Reproduction:
  1. Join above world (called Player A) this could be later instances in Player A's client.
  2. Check log message about
    Sync_JoinCount
    .
  3. Another player join same instance (called Player B). The player MUST use the first instance in Player B's client (Use direct link!!).
  4. Check log message about
    Sync_JoinCount
    .
Expected Results:
At Player B log, Value Change log should be after
Start()
log.
Actual Results:
At Player B log, Value Change log happens before
Start()
log. (Picture is in local build test)
(If the instance is not the first in Player B's client, expected result will happen.)
----
Build: 1259
SDK World: 3.1.10