Class ServerRpcAttribute
Marks a method as ServerRpc.
A ServerRpc marked method will be fired by a client but executed on the server.
Inherited Members
Namespace: Unity.Netcode
Assembly: Unity.Netcode.Runtime.dll
Syntax
[AttributeUsage(AttributeTargets.Method)]
public class ServerRpcAttribute : RpcAttribute
Constructors
ServerRpcAttribute()
Initializes a new instance of ServerRpcAttribute configured to target the server.
Declaration
public ServerRpcAttribute()
Fields
RequireOwnership
When true, only the owner of the NetworkObject can invoke this ServerRpc.
Declaration
public bool RequireOwnership
Field Value
Type | Description |
---|---|
bool |