Choose your implementation method:
C
C#
This function is part of the Connect Interface.
Remarks
Create a new unique pseudo-account that can be used to identify the current user profile on the local device. This function is intended to be used by mobile games and PC games that wish to allow a new user to start playing without requiring to login to the game using any user identity. In addition to this, the Device ID feature is used to automatically login the local user also when they have linked at least one external user account(s) with the local Device ID. It is possible to link many devices with the same user's account keyring using the Device ID feature. Linking a device later or immediately with a real user account will ensure that the player will not lose their progress if they switch devices or lose the device at some point, as they will be always able to login with one of their linked real accounts and also link another new device with the user account associations keychain. Otherwise, without having at least one permanent user account linked to the Device ID, the player would lose all of their game data and progression permanently should something happen to their device or the local user profile on the device. After a successful one-time CreateDeviceId operation, the game can login the local user automatically on subsequent game starts with EOS_Connect_Login using the EOS_ECT_DEVICEID_ACCESS_TOKEN credentials type. If a Device ID already exists for the local user on the device then EOS_DuplicateNotAllowed error result is returned and the caller should proceed to calling EOS_Connect_Login directly.
Parameters
EOS_Connect_CreateDeviceId
Parameter Type And Name |
Usage Information |
---|---|
EOS_HConnect Handle |
|
const EOS_Connect_CreateDeviceIdOptions* Options |
structure containing operation input parameters. |
void* ClientData |
arbitrary data that is passed back to you in the CompletionDelegate. |
const EOS_Connect_OnCreateDeviceIdCallback CompletionDelegate |
a callback that is fired when the create operation completes, either successfully or in error. |
This function is asynchronous; the EOS SDK guarantees that your callback (the CompletionDelegate
parameter) will run when the operation completes, regardless of whether it succeeds or fails. Use the void*
parameter to pass any contextual information the callback may need in order to react properly. Relevant information can be copied from the EOS SDK's cache while the callback function is running. You do not need to remove the callback function.
Callback Function Information
Because this function is asynchronous, it employs a callback of type EOS_Connect_OnCreateDeviceIdCallback to report the results of its operation.
Callback Parameters
EOS_Connect_OnCreateDeviceIdCallback
Parameter Type And Name |
Usage Information |
---|---|
const EOS_Connect_CreateDeviceIdCallbackInfo* Data |
Output parameters for the EOS_Connect_CreateDeviceId function. |
Related API Members
This function is part of the Connect Interface.
Remarks
Create a new unique pseudo-account that can be used to identify the current user profile on the local device. This function is intended to be used by mobile games and PC games that wish to allow a new user to start playing without requiring to login to the game using any user identity. In addition to this, the Device ID feature is used to automatically login the local user also when they have linked at least one external user account(s) with the local Device ID. It is possible to link many devices with the same user's account keyring using the Device ID feature. Linking a device later or immediately with a real user account will ensure that the player will not lose their progress if they switch devices or lose the device at some point, as they will be always able to login with one of their linked real accounts and also link another new device with the user account associations keychain. Otherwise, without having at least one permanent user account linked to the Device ID, the player would lose all of their game data and progression permanently should something happen to their device or the local user profile on the device. After a successful one-time CreateDeviceId operation, the game can login the local user automatically on subsequent game starts with {Login} using the {ExternalCredentialType.DeviceidAccessToken} credentials type. If a Device ID already exists for the local user on the device then {Result.DuplicateNotAllowed} error result is returned and the caller should proceed to calling {Login} directly.
Parameters
Connect.ConnectInterface.CreateDeviceId
Parameter Type And Name |
Usage Information |
---|---|
CreateDeviceIdOptions options |
structure containing operation input parameters. |
object clientData |
arbitrary data that is passed back to you in the CompletionDelegate. |
OnCreateDeviceIdCallback completionDelegate |
a callback that is fired when the create operation completes, either successfully or in error. |
This function is asynchronous; the EOS SDK guarantees that your callback (the CompletionDelegate
parameter) will run when the operation completes, regardless of whether it succeeds or fails. Use the object
parameter to pass any contextual information the callback may need in order to react properly. Relevant information can be copied from the EOS SDK's cache while the callback function is running. You do not need to remove the callback function.
Callback Function Information
Because this function is asynchronous, it employs a callback of type Connect.OnCreateDeviceIdCallback to report the results of its operation.
Callback Parameters
Connect.OnCreateDeviceIdCallback
Parameter Type And Name |
Usage Information |
---|---|
CreateDeviceIdCallbackInfo data |
Output parameters for the {ConnectInterface.CreateDeviceId} function. |