Network authority and replication¶
Authority decides whether the server or a client may change an entity. Replication copies changes from the server to clients.
- Server scripts can change any entity. The engine sends each change to a replicated component to clients in its next network update, and clients that join later get the current values.
- The server sends a new
Positiononly when it rounds to a different 1/1024-unit step than the last one the client got. - A client script may write properties of any entity, but the write stays on that client. On a server-owned entity it lasts until the server next changes the same component.
- When a client writes
Collider,CollisionGroupor a collision tag such asTriggerorAnchoredon a server-owned entity, local movement prediction disagrees with the server; the first such write logs a warning. Send aNet.ToServermessage so the server makes the change. - On a server-owned entity, a client script cannot call
Destroy,AddorRemove, or writeParent. Send aNetmessage instead. - Only server scripts write runtime state, except a few properties such as
CharacterMoveIntent.ActionBitsthat the owning client writes too.
Engine errors lists the error and warning texts.