Class LevelPlaySegment
Representation of a user segment.
Inherited Members
Namespace: Unity.Services.LevelPlay
Assembly: Unity.LevelPlay.dll
Syntax
public class LevelPlaySegment
Fields
CustomData
Collection of custom key-value pairs for additional user segmentation.
Declaration
public readonly Dictionary<string, string> CustomData
Field Value
Type | Description |
---|---|
Dictionary<string, string> |
IapTotal
The total value of purchases made by the user.
Declaration
public double IapTotal
Field Value
Type | Description |
---|---|
double |
IsPaying
Indicates if the user has made any purchases in the game.
Declaration
public int IsPaying
Field Value
Type | Description |
---|---|
int |
Level
Game level reached by the user.
Declaration
public int Level
Field Value
Type | Description |
---|---|
int |
SegmentName
Name of the segment.
Declaration
public string SegmentName
Field Value
Type | Description |
---|---|
string |
UserCreationDate
User account creation time in milliseconds.
Declaration
public long UserCreationDate
Field Value
Type | Description |
---|---|
long |
Methods
GetSegmentAsDictionary()
Converts the segment object into a dictionary representation.
Declaration
public Dictionary<string, string> GetSegmentAsDictionary()
Returns
Type | Description |
---|---|
Dictionary<string, string> | Dictionary containing all defined segment parameters as string key-value pairs. |
SetCustom(string, string)
Add a custom key-value pair to the segment for additional user segmentation.
Declaration
public void SetCustom(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | Custom parameter identifier. |
string | value | The value associated with the custom parameter. |