ClientSim icon indicating copy to clipboard operation
ClientSim copied to clipboard

OnPreSerialization not called after RequestSerialization()

Open MyroG opened this issue 2 years ago • 1 comments

The code bellow doesn't display "OnPreSerialization" in the console after "ToggleOpenState" is triggered

public void ToggleOpenState()
{
    if (!Networking.IsOwner(gameObject))
    {
        return;
    }

    Debug.Log("ToggleOpenState"); //this shows up in the console
    RequestSerialization();
}

public override void OnPreSerialization()
{
    Debug.Log("OnPreSerialization");  //this doesn't show up in the console
}

It work in-game, but not on ClientSim.

MyroG avatar Mar 20 '23 17:03 MyroG

VRChat now keeps the latest Udonsync value from the Owner on the server side. This means that even if there is only one person in the instance, the RequestSerialization() will be accepted and a series of serialization processes will be performed. It makes sense for ClientSim to emulate this.

mimyquality avatar May 18 '24 05:05 mimyquality