Skip to main content

PreAuthenticating

Gets called on a separate thread when the player is pre-authenticating. DO NOT call Unity APIs in handlers of this event; doing so may cause the server to crash.

Start a script section

!-- OnEvent PreAuthenticating
-- require $evCanJoin $evUserId $evIpAddress $evExpiration &evFlags $evRegion &evSignature *evConnectionRequest $evReaderStartPosition $evIsAllowed $evForceReject *evCustomReject

# Add your instructions here
  • Group: PlayerEvents
  • Cancellable: Yes
  • Event data: PlayerPreAuthenticatingEventArgs

Injected variables

VariableTypeDescription
$evCanJoinbool valueGets or sets whether the player should be able to join server (this value can be false if server is full).
$evUserIdtext valueGets the user ID of the player.
$evIpAddresstext valueGets the IP Address the of player.
$evExpirationnumber valueGets the expiration of the authentication.
&evFlagscollection of CentralAuthPreauthFlags enum valuesGets the pre-authentication flags.
$evRegiontext valueGets the region of the origin.
&evSignaturecollection of number valueGets the signature of auth.
*evConnectionRequestreference to ConnectionRequest objectGets the connection request to server.
$evReaderStartPositionnumber valueGets the start position of stream.
$evIsAllowedbool valueWhether the event is allowed to run.
$evForceRejectbool valueGets or sets whether the connection should be rejected.
*evCustomRejectreference to NetDataWriter objectGets or sets the custom rejection writer.