When testing udon networking with RequestSerialization, networking events such as OnPre/OnPost Serialization are never called. This makes patterns such as the below one difficult, which are useful in helping avoid bug-prone netcode.
public override void OnPostSerialization(SerializationResult result) => _ApplyNetwork();
public override void OnDeserialization(DeserializationResult result) => _ApplyNetwork();
private void _ApplyNetwork()
{
// Perform tasks here
}
I will attach a shim I made that patches over this issue, though it doesn't correctly handle all cases that VRChat performs, and the OnDeserialization behavior here can actually clobber data - so an official implementation should probably either do nothing if not owned, or run OnPreSerialization() first in this case. It's a bit of a hack, but it helps with some testing.
It also doesn't do anything for continuous sync, this is just a minimal shim I made for my own use.