Class KaijuUserLink
Link a KaijuUser to their Netcode for GameObjects ID.
Inheritance
Namespace: KaijuSolutions.MultiplayerEngine.NetcodeForGameObjects
Syntax
public sealed class KaijuUserLink : NetworkBehaviour
Properties
Display
The rich presence localization token that will be displayed in a user's selected language in the Steam client UI for this KaijuUser.
Declaration
public string Display { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Group
The rich presence group for this KaijuUser.
Declaration
public string Group { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
GroupSize
The rich presence group size for this KaijuUser.
Declaration
public int GroupSize { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Icon
The icon of this KaijuUser.
Declaration
public Texture2D Icon { get; }
Property Value
| Type | Description |
|---|---|
| Texture2D |
IconSize
The size of icon we want for the KaijuUser.
Large = 128 x 128.
Medium = 64 x 64.
Small = 32 x 32.
None = No icon.
Declaration
public KaijuIconSize IconSize { get; set; }
Property Value
| Type | Description |
|---|---|
| KaijuIconSize |
Id
The ID of the KaijuUser this is for.
Declaration
public ulong Id { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt64 |
Level
The level for this KaijuUser.
Declaration
public int Level { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Name
The name of the KaijuUser.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Relationship
The relationship with this KaijuUser.
Declaration
public KaijuRelationship Relationship { get; }
Property Value
| Type | Description |
|---|---|
| KaijuRelationship |
RichPresence
All rich presence for this KaijuUser.
Declaration
public Dictionary<string, string> RichPresence { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<System.String, System.String> |
State
The state of this KaijuUser.
Declaration
public KaijuState State { get; }
Property Value
| Type | Description |
|---|---|
| KaijuState |
Status
The rich presence status to display when someone views this user's game info for this KaijuUser.
Declaration
public string Status { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
User
The user this object is linked to.
Declaration
public KaijuUser User { get; }
Property Value
| Type | Description |
|---|---|
| KaijuUser |
Valid
Check if this KaijuUser is valid or not.
Declaration
public bool Valid { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Voice
The voice playback source for this KaijuUser.
Declaration
public AudioSource Voice { get; set; }
Property Value
| Type | Description |
|---|---|
| AudioSource |
Methods
GetAchievement(String)
Gets the unlock status of an achievement of this KaijuUser. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public bool GetAchievement(string achievement)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | achievement | The API name of the achievement. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the achievement is unlocked or not for the KaijuUser. Will also return false if there was an error retrieving the achievement. |
GetAchievement(String, out DateTime)
Gets the unlock status of an achievement and the time it was unlocked at for this KaijuUser. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public bool GetAchievement(string achievement, out DateTime time)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | achievement | The API name of the achievement. |
| DateTime | time | The time the achievement was unlocked at if it has been. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the achievement is unlocked or not for the KaijuUser. Will also return false if there was an error retrieving the achievement. |
GetAchievement(UInt32)
Gets the unlock status of an achievement of this KaijuUser. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public bool GetAchievement(uint index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | index | The achievement's index. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the achievement is unlocked or not for the KaijuUser. Will also return false if there was an error retrieving the achievement. |
GetAchievement(UInt32, out DateTime)
Gets the unlock status of an achievement and the time it was unlocked at for this KaijuUser. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public bool GetAchievement(uint index, out DateTime time)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | index | The achievement's index. |
| DateTime | time | The time the achievement was unlocked at if it has been. |
Returns
| Type | Description |
|---|---|
| System.Boolean | If the achievement is unlocked or not for the KaijuUser. Will also return false if there was an error retrieving the achievement. |
GetMemberData(String)
Get a data value for this KaijuUser in our lobby.
Declaration
public string GetMemberData(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | The value to get. |
Returns
| Type | Description |
|---|---|
| System.String | The given value. Will return an empty string if we are not in a lobby, the assigned user is not in our lobby, the data did not exist, or there was an error. |
GetRichPresence(String)
Get a rich presence of this KaijuUser.
Declaration
public string GetRichPresence(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | The key. |
Returns
| Type | Description |
|---|---|
| System.String | The rich presence value or an empty string if it was not set. |
GetStatFloat(String, Single)
Get a float stat for this KaijuUser. If this is an integer stat as set in Steamworks, it will cast it to a float. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public float GetStatFloat(string stat, float fallback = 0F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | stat | The API name of the stat. |
| System.Single | fallback | The value to return if there is an error getting the achievement. |
Returns
| Type | Description |
|---|---|
| System.Single | The value of the stat for the KaijuUser or the fallback value if there is an error. |
GetStatInteger(String, Int32)
Get an integer stat for this KaijuUser. If this is a float stat as set in Steamworks, it will cast it to an integer. You must have called RequestStats(UInt64) for this KaijuUser and have their OnUserStatsReceived or OnStatsReceived callbacks triggered before accessing this.
Declaration
public int GetStatInteger(string stat, int fallback = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | stat | The API name of the stat. |
| System.Int32 | fallback | The value to return if there is an error getting the achievement. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The value of the stat for the KaijuUser or the fallback value if there is an error. |
OnNetworkSpawn()
Gets called when the
Declaration
public override void OnNetworkSpawn()
Overlay()
Open the Steam overlay to this KaijuUser.
Declaration
public bool Overlay()
Returns
| Type | Description |
|---|---|
| System.Boolean | If the overlay was opened or not. |
OverlayBindable()
Open the Steam overlay to this KaijuUser.
Declaration
public void OverlayBindable()
RequestStats()
Request the stats for this KaijuUser. Listen for a OnUserStatsReceived callback to get the result.
Declaration
public bool RequestStats()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the request was made, false otherwise. |
RequestStatsBindable()
Request the stats for this KaijuUser. Listen for a OnUserStatsReceived callback to get the result.
Declaration
public void RequestStatsBindable()