Struct ConnectionApproved
Add this component to a ServerWorld network connection entity, to denote that it has been approved by your logic. It will be added automatically on the client, once the connection is approved.
Implements
IComponentData
IQueryTypeParameter
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct ConnectionApproved : IComponentData, IQueryTypeParameter
Remarks
Typically: The flow is that you'll send a game-specific IApprovalRpcCommand to the server,
containing a authentication secret fetched from your game backend. The server RPC handling logic then needs
to authenticate this secret, and - if valid - add this component to denote (to netcode) that this connection is
approved.
If the client fails authentication, either allow them to timeout, or manually disconnect them with
ApprovalFailure.
Implements
Unity.Entities.IComponentData
Unity.Entities.IQueryTypeParameter