Enum SendTo
Configuration for the default method by which an RPC is communicated across the network
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
public enum SendTo
Fields
Name | Description |
---|---|
ClientsAndHost | Send this RPC to all clients, including the host, if a host exists. If the server is running in host mode, this is the same as Everyone. If the server is running in dedicated server mode, this is the same as NotServer. |
Everyone | Send this RPC to everone, filtered to the current observer list. Will execute locally. |
Me | Execute this RPC locally.
|
NotMe | Send this RPC to everyone but the local machine, filtered to the current observer list. |
NotOwner | Send to everyone but the current owner, filtered to the current observer list. Will execute locally if the local process is not the owner. |
NotServer | Send to everyone but the server, filtered to the current observer list.
Will NOT send to a server running in host mode - it is still treated as a server.
If you want to send to servers when they are host, but not when they are dedicated server, use
ClientsAndHost.
|
Owner | Send to the NetworkObject's current owner. Will execute locally if the local process is the owner. |
Server | Send to the server, regardless of ownership. Will execute locally if invoked on the server. |
SpecifiedInParams | This RPC cannot be sent without passing in a target in RpcSendParams. |