Class BootstrapPlayer
Component attached to the "Player Prefab" on the NetworkManager
.
Inherited Members
Namespace: Unity.Netcode.Samples
Syntax
public class BootstrapPlayer : NetworkBehaviour
Methods
RandomTeleportServerRpc()
If this method is invoked on the client instance of this player, it will invoke a ServerRpc
on the server-side.
If this method is invoked on the server instance of this player, it will teleport player to a random position.
Declaration
public void RandomTeleportServerRpc()
Remarks
Since a NetworkTransform
component is attached to this player, and the authority on that component is set to "Server",
this transform's position modification can only be performed on the server, where it will then be replicated down to all clients through NetworkTransform
.