Variables marked with the [UdonSynced] attribute are synchronized across the network. Note that the 'size' listed below refers to the approximate memory size; serialized data transmitted over the network may be larger (e.g., a bool typically sends at least 1 byte).
To monitor actual serialized data usage, use the byteCount property in the OnPostSerialization event. For detailed networking constraints, refer to the official Udon Network Specs.
### Boolean types
| Type | Size |
| ---- | ------- |
| bool | 1 byte |
### Integral numeric types
| Type | Range | Size |
|--------|---------------------------------|---------|
| sbyte | -128 to 127 | 1 byte |
| byte | 0 to 255 | 1 byte |
| short | -32,768 to 32,767 | 2 bytes |
| ushort | 0 to 65,535 | 2 bytes |
| int | -2,147,483,648 to 2,147,483,647 | 4 bytes |
| uint | 0 to 4,294,967,295 | 4 bytes |
| long | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | 8 bytes |
| ulong | 0 to 18,446,744,073,709,551,615 | 8 bytes |
### Floating-point numeric types
| Type | Approximate range | Precision | Size |
|--------|-------------------------------|---------------|----------|
| float | ±1.5 x 10^(−45) to ±3.4 x 10^(38) | ~6-9 digits | 4 bytes |
| double | ±5.0 × 10^(−324) to ±1.7 × 10^(308) | ~15-17 digits | 8 bytes |
### Vector mathematics types and structures (Unity)
| Type | Range | Size |
|-------------|---------------|----------|
| [Vector2](https://docs.unity3d.com/ScriptReference/Vector2.html) | same as float | 8 bytes |
| [Vector3](https://docs.unity3d.com/ScriptReference/Vector3.html) | same as float | 12 bytes |
| [Vector4](https://docs.unity3d.com/ScriptReference/Vector4.html) | same as float | 16 bytes |
| [Quaternion](https://docs.unity3d.com/ScriptReference/Quaternion.html) | same as float | 16 bytes |
### Color structures
| Type | Range / Precision | Size |
|----------|-------------------|----------|
| [Color](https://docs.unity3d.com/ScriptReference/Color.html) | same as float | 16 bytes |
| [Color32](https://docs.unity3d.com/ScriptReference/Color32.html) | same as byte | 4 bytes |
### Text types and structures
| Type | Range | Size |
|--------|------------------|----------|
| char | U+0000 to U+FFFF | 2 bytes |
| string | same as char | 2 bytes / char |
### Other structures
| Type | Range | Size |
|--------|------------------|----------|
| [VRCUrl](#vrcurl) | U+0000 to U+FFFF | 2 bytes / char |