1 | ||
1 | ||
1 | ||
1 |
Summary of Use Cases for Attributes
Attribute Runs On Use Case
[Server] Server Methods for server-only logic.
[Client] Client Methods for client-side logic.
[Command] Server Client-to-server communication.
[ClientRpc] Client Server-to-all-clients communication.
[TargetRpc] Client Server-to-specific-client communication.
[SyncVar] Both Automatic state synchronization for fields.
[SyncObject] Both Automatic state synchronization for collections.
[RequiresAuthority] Both Ensuring only authorized clients can interact with objects or methods.
[ServerCallback] Server Internal server-side methods, without client warning logs.
[ClientCallback] Client Internal client-side methods, without server warning logs.
These attributes are the primary tools for handling networked logic, authority, and state in Mirror.