RequestSerialization in OnOwnershipRequest

Is it supposed for the synced variables to be synced when RequestSerialization is called in OnOwnershipRequest before it returns true?

i.e., Will OnOwnershipTransferred be called after the next Network Tick?

Hi, @nuip ! Thank you for posting!

Would you mind providing additional context? Have you been testing ownership transfers and observed something you didn’t expect?

No, I’m still designing how to sync the data.

I want to sync an array, but I don’t want to RequestSerialization every time the array is updated because it’s large. Then I noticed that it would be sufficient to sync it on ownership transfer in my case, and that raised the concern mentioned above.

1 Like

Cool! Thanks for clarifying.

The intent of OnOwnershipRequest is just to allow or deny ownership transfers. I don’t think there’s a spec for how it should behave when changing synced variables during the transfer.

It might work! I would suggest trying it out. If it turns out to be very useful behaviour, perhaps we should add it to Udon’s specifications :thinking:

I would try it if we knew that the result would always be the same. However, I suspect it may depend on various conditions (VRC build version, the number of people in the instance, world performance, etc.) and could cause a bug that is hard to reproduce.
Let me consider other ways.

2 Likes