docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LevelPlaySegment

    Representation of a user segment.

    Inheritance
    object
    LevelPlaySegment
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)