User Tools

Site Tools


misc:vrchat_knowledge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
misc:vrchat_knowledge [2026/06/11 09:21] nataliemisc:vrchat_knowledge [2026/06/11 09:37] (current) natalie
Line 25: Line 25:
 ==== Fast CRC32 ==== ==== Fast CRC32 ====
 Animator.StringToHash() is faster than writing your own CRC32 in Udon. Animator.StringToHash() is faster than writing your own CRC32 in Udon.
 +
 +==== Random Udon Networking tips ====
 +  * Basic thing that took me a while to understand in the beginning: While Udon follows an eventual consistency networking model even in Manual sync mode, networked variable updates //on a particular instance of an UdonBehavior// are atomic.
 +  * OnPreSerialization() is a great place to transform values for network syncing if you have different internal and networked representations.
 +  * RPC is kind of cursed and you should only do it when it truly suits the task. I much prefer implementing a networking model where the object owner periodically publishes a desired state, and remote clients do whatever work is required to enter that state regardless of the state they're currently in.
 +
 +==== Random Persistence tips ====
 +  * When using PlayerData, prefer using VRCJson or another method to serialize all your variables into one PlayerData key, instead of using multiple keys. The decrease in storage efficiency is worth the benefit of being able to delete keys.
misc/vrchat_knowledge.txt · Last modified: 2026/06/11 09:37 by natalie