Unique IDs to be used by the AccelByte online subsystem for users. This implementation follows a composite structure, where we not only store the AccelByte ID in a single structure, but also, optionally, the platform name and ID in the same structure.
More...
|
| virtual FName | GetType () const override |
| | Return the type of this unique ID. In this case, it should always be ACCELBYTE_USER_ID_TYPE.
|
| virtual bool | IsValid () const override |
| | Whether or not this ID is a valid AccelByte UniqueNetId type. Will do a number of checks including:
|
| virtual FString | ToDebugString () const override |
| | Returns the JSON representation of AccelByte composite ID, useful for debugging.
|
| FString | GetAccelByteId () const |
| | Get the string representation of the AccelByte user ID from the composite ID.
|
| FString | GetPlatformType () const |
| | Get the string representation of the type of platform for platform ID from the composite ID.
|
| FString | GetPlatformId () const |
| | Get the string representation of the ID of the user for the platform type specified from the composite ID.
|
| bool | HasPlatformInformation () const |
| | Checks whether or not this composite ID has platform information included.
|
| FUniqueNetIdPtr | GetPlatformUniqueId () const |
| | Tries to convert the platform ID information into that native platform OSS' unique ID type.
|
| FAccelByteUniqueIdComposite | GetCompositeStructure () const |
| | Gets the underlying composite structure for this unique ID.
|
| virtual bool | Compare (FUniqueNetId const &Other) const override |
| | Override equal check operator to check the AccelByte ID first, and then the platform type/ID.
|
|
| static FUniqueNetIdAccelByteUserRef | Create (FAccelByteUniqueIdComposite const &InCompositeId) |
| | Create a new AccelByte User UniqueNetId instance from a composite ID.
|
| static FUniqueNetIdAccelByteUserRef | Create (FString const &InNetIdStr) |
| | Create a new AccelByte User UniqueNetId instance from a string of UniqueNetId.
|
| static FUniqueNetIdAccelByteUserRef | Create (FUniqueNetId const &InNetId) |
| | Create a new AccelByte User UniqueNetId instance from a generic UniqueNetId.
|
| static FUniqueNetIdAccelByteUserRef | Cast (FUniqueNetId const &InNetId) |
| | Takes an UniqueNetId object and converts it to an AccelByte User UniqueNetId instance if the type matches. Will return an Invalid ID reference if the conversion cannot be made. Prefer the other Cast methods if possible.
|
| static FUniqueNetIdAccelByteUserPtr | TryCast (FUniqueNetId const &InNetId) |
| | Attempts to convert an UniqueNetId object to an AccelByte User UniqueNetId instance. Will return nullptr if the cast cannot be made.
|
| static FUniqueNetIdAccelByteUserPtr | TryCast (FUniqueNetIdRef const &InNetId) |
| | Attempts to convert a shared reference of UniqueNetId object to an AccelByte User UniqueNetId instance. Will return nullptr if the cast cannot be made.
|
| static FUniqueNetIdAccelByteUserRef | Invalid () |
| | Convenience method to construct an invalid instance of an AccelByte UniqueNetId.
|
| static FUniqueNetIdAccelByteUserRef | CastChecked (FUniqueNetId const &InNetId) |
| | Attempts to convert an UniqueNetId object to an AccelByte User UniqueNetId instance. Guarded by a check call that will crash if an improper ID is attempted to be casted.
|
| static FUniqueNetIdAccelByteUserRef | CastChecked (FUniqueNetIdRef const &InNetIdRef) |
| | Attempts to convert a shared reference of UniqueNetId object to an AccelByte User UniqueNetId instance. Guarded by a check call that will will crash if an improper ID is attempted to be casted.
|
| template<typename... TArgs> |
| static FUniqueNetIdAccelByteResourceRef | Create (TArgs &&... Args) |
| | Create a new AccelByte Resource UniqueNetId instance.
|
| static FUniqueNetIdAccelByteResourceRef | Cast (FUniqueNetId const &InNetId) |
| | Takes an UniqueNetId object and converts it to an AccelByte Resource UniqueNetId instance if the type matches. Will return an Invalid ID reference if the conversion cannot be made. Prefer the other Cast methods if possible.
|
| static FUniqueNetIdAccelByteResourcePtr | TryCast (FUniqueNetId const &InNetId) |
| | Attempts to convert an UniqueNetId object to an AccelByte Resource UniqueNetId instance. Will return nullptr if the cast cannot be made.
|
| static FUniqueNetIdAccelByteResourcePtr | TryCast (FUniqueNetIdRef const &InNetIdRef) |
| | Attempts to convert a shared reference of UniqueNetId object to an AccelByte Resource UniqueNetId instance. Will return nullptr if the cast cannot be made.
|
| static FUniqueNetIdAccelByteResourceRef | Invalid () |
| | Convenience method to construct an invalid instance of AccelByte Resource UniqueNetId.
|
| static FUniqueNetIdAccelByteResourceRef | CastChecked (FUniqueNetIdRef const &InNetIdRef) |
| | Attempts to convert a shared reference of UniqueNetId object to an AccelByte Resource UniqueNetId instance. Guarded by a check call that will crash if an improper ID is attempted to be casted.
|
|
|
| FUniqueNetIdAccelByteUser () |
| | Default constructor.
|
| | FUniqueNetIdAccelByteUser (FString const &InNetIdStr) |
| | Internal constructor that accepts an UniqueNetId string.
|
| | FUniqueNetIdAccelByteUser (FString &&InNetIdStr) |
| | Internal constructor that pass the ownership of UniqueNetId string.
|
| | FUniqueNetIdAccelByteUser (FUniqueNetId const &InNetId) |
| | Internal constructor that accepts an instance of UniqueNetId.
|
| | FUniqueNetIdAccelByteUser (FString const &InNetIdStr, FName const InType) |
| | Internal constructor that accepts an UniqueNetId string and its type name.
|
| | FUniqueNetIdAccelByteUser (FString &&InNetIdStr, FName const InType) |
| | Internal constructor that accepts the ownership of UniqueNetId string and its type name.
|
|
| FUniqueNetIdAccelByteResource () |
| | Default constructor.
|
| | FUniqueNetIdAccelByteResource (FString const &InNetIdStr) |
| | Internal constructor that accepts an UniqueNetId string.
|
| | FUniqueNetIdAccelByteResource (FString &&InNetIdStr) |
| | Internal constructor that pass the ownership of UniqueNetId string.
|
| | FUniqueNetIdAccelByteResource (FUniqueNetId const &InNetId) |
| | Internal constructor that accepts an instance of UniqueNetId.
|
| | FUniqueNetIdAccelByteResource (FString const &InNetIdStr, FName const InType) |
| | Internal constructor that accepts an UniqueNetId string and its type name.
|
| | FUniqueNetIdAccelByteResource (FString &&InNetIdStr, FName const InType) |
| | Internal constructor that accepts the ownership of UniqueNetId string and its type name.
|
Unique IDs to be used by the AccelByte online subsystem for users. This implementation follows a composite structure, where we not only store the AccelByte ID in a single structure, but also, optionally, the platform name and ID in the same structure.
These IDs can be casted to and broken apart to get those IDs as needed, such as for interop with native platform SDKs.
For this, there will be three extra fields in an FUniqueNetIdAccelByte, which are as follows:
- AccelByteIDString
- PlatformTypeString
- PlatformIDString
When any of these are set, the underlying string for FUniqueNetIdString is set to a Base64 encoded JSON object that contains all of these fields individually. An example of this JSON object is as follows: { "id": "<AccelByte ID>", "platformType": "<type of platform the platformId field corresponds to, can be blank>", "platformId": "<ID of the platform that platformType corresponds to, can be blank>" }
ToString will return the encoded version of this string, while ToDebugString will return the decoded version.
To get any of these fields from the ID, you will want to cast to an FUniqueNetIdAccelByte and use the getters there. However, most of the ID manipulation is handled for you by the OSS, so there shouldn't be a need to crack open these IDs unless you need to make SDK calls yourself.