Skip to main content

Unity Primitives

Unity Primitive Color, Color32, Vector2, Vector3, Vector4, Quaternion, Ray, Ray2D types will be serialized by built-in serialization code.

[ClientRpc]
void BarClientRpc(Color somecolor) { /* ... */ }

void Update()
{
if (Input.GetKeyDown(KeyCode.P))
{
BarClientRpc(Color.red); // Server -> Client
}
}