docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Campaign

    Response type for a Campaign.

    Inheritance
    object
    Campaign
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Apis.Admin.RemoteConfig
    Assembly: Unity.Services.Apis.dll
    Syntax
    [DataContract(Name = "Campaign")]
    [Preserve]
    public class Campaign

    Constructors

    Campaign(string, List<CampaignVariants>, bool, List<string>, List<string>, int, int, DateTime, DateTime, string)

    Initializes a new instance of the Campaign class.

    Declaration
    [Preserve]
    public Campaign(string name = null, List<CampaignVariants> variants = null, bool enabled = false, List<string> kpi = null, List<string> audience = null, int rolloutPercentage = 100, int priority = 1000, DateTime startDate = default, DateTime endDate = default, string description = null)
    Parameters
    Type Name Description
    string name

    name.

    List<CampaignVariants> variants

    variants.

    bool enabled

    enabled (default to false).

    List<string> kpi

    List of key performing indicators.

    List<string> audience

    A list of audience whom you want to target your campaign.

    int rolloutPercentage

    The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session. (default to 100).

    int priority

    Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game override that was created first. (default to 1000).

    DateTime startDate

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect..

    DateTime endDate

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active..

    string description

    description.

    Properties

    Audience

    A list of audience whom you want to target your campaign

    Declaration
    [DataMember(Name = "audience", EmitDefaultValue = false)]
    [Preserve]
    public List<string> Audience { get; set; }
    Property Value
    Type Description
    List<string>

    A list of audience whom you want to target your campaign

    Condition

    The Condition is a JEXL expression of contextual data attributes that defines the target audience for a game override. ### JEXL support - JexlExpression from the Java Expression Language (JEXL) spec. - JexlScripts are not supported. ### Categories Remote Config supports the following attribute categories. Category | Description - -- -- -- - | - -- -- -- -- -- user | Custom developer-defined attributes that describe the user. app | Custom developer-defined attributes that describe the application. unity | Predefined attributes (detailed below). #### Custom User ID When you call SetCustomUserId in our C# APIs, this automatically exposes the ID you pass in to the user attributes. Example from C#: ConfigManager.SetCustomUserID(\"some-user-id\"); Allows you to create a game override condition like: user.customUserId == \"some-user-id\" #### Predefined unity attributes Attribute | Type | Description | Example - -- -- -- -- | - -- - | - -- -- -- -- -- | - -- -- -- appBuildVersion | String | The build number your application is running. | \"1\" appVersion | String | The version your application is running. | \"1.0\" cpu | String | The name of the CPU processor. | \"Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz\" cpuFrequency | Int | The processor frequency in MHz of the device running your app. | 3100 country | String | The applicable country. This attribute uses ISO 3166-1 alpha2 country codes. | \"US\" language | String | The applicable language. This attribute uses ISO 639-1 language codes. | \"en\" osVersion | String | The operating system version of the device running your app. | \"Mac OS X 10.14.3\" platform | String | The applicable device or platform (see below). | \"iOS\" timeSinceStart | Int | The time in milliseconds since a session of your app has begun. | 2473741 graphicsDeviceVendor | String | Vendor of the user's graphics card. | \"ATI Technologies Inc.\" ram | Int | Amount of RAM in MB on the device. | 16384 #### Supported platforms - Android - iOS - Linux - macOS - Metro - SamsungTV - Switch - Tizen - tvOS - WebGL - Wii - Windows

    Declaration
    [DataMember(Name = "condition", EmitDefaultValue = false)]
    [Preserve]
    public string Condition { get; }
    Property Value
    Type Description
    string

    The Condition is a JEXL expression of contextual data attributes that defines the target audience for a game override. ### JEXL support - JexlExpression from the Java Expression Language (JEXL) spec. - JexlScripts are not supported. ### Categories Remote Config supports the following attribute categories. Category | Description - -- -- -- - | - -- -- -- -- -- user | Custom developer-defined attributes that describe the user. app | Custom developer-defined attributes that describe the application. unity | Predefined attributes (detailed below). #### Custom User ID When you call SetCustomUserId in our C# APIs, this automatically exposes the ID you pass in to the user attributes. Example from C#: ConfigManager.SetCustomUserID(\"some-user-id\"); Allows you to create a game override condition like: user.customUserId == \"some-user-id\" #### Predefined unity attributes Attribute | Type | Description | Example - -- -- -- -- | - -- - | - -- -- -- -- -- | - -- -- -- appBuildVersion | String | The build number your application is running. | \"1\" appVersion | String | The version your application is running. | \"1.0\" cpu | String | The name of the CPU processor. | \"Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz\" cpuFrequency | Int | The processor frequency in MHz of the device running your app. | 3100 country | String | The applicable country. This attribute uses ISO 3166-1 alpha2 country codes. | \"US\" language | String | The applicable language. This attribute uses ISO 639-1 language codes. | \"en\" osVersion | String | The operating system version of the device running your app. | \"Mac OS X 10.14.3\" platform | String | The applicable device or platform (see below). | \"iOS\" timeSinceStart | Int | The time in milliseconds since a session of your app has begun. | 2473741 graphicsDeviceVendor | String | Vendor of the user's graphics card. | \"ATI Technologies Inc.\" ram | Int | Amount of RAM in MB on the device. | 16384 #### Supported platforms - Android - iOS - Linux - macOS - Metro - SamsungTV - Switch - Tizen - tvOS - WebGL - Wii - Windows

    CreatedAt

    Gets or Sets CreatedAt

    Declaration
    [DataMember(Name = "createdAt", EmitDefaultValue = false)]
    [Preserve]
    public DateTime CreatedAt { get; }
    Property Value
    Type Description
    DateTime

    Description

    Gets or Sets Description

    Declaration
    [DataMember(Name = "description", EmitDefaultValue = false)]
    [Preserve]
    public string Description { get; set; }
    Property Value
    Type Description
    string

    Enabled

    Gets or Sets Enabled

    Declaration
    [DataMember(Name = "enabled", EmitDefaultValue = true)]
    [Preserve]
    public bool Enabled { get; set; }
    Property Value
    Type Description
    bool

    EndDate

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active.

    Declaration
    [DataMember(Name = "endDate", EmitDefaultValue = false)]
    [Preserve]
    public DateTime EndDate { get; set; }
    Property Value
    Type Description
    DateTime

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active.

    EnvironmentId

    Gets or Sets EnvironmentId

    Declaration
    [DataMember(Name = "environmentId", EmitDefaultValue = false)]
    [Preserve]
    public string EnvironmentId { get; }
    Property Value
    Type Description
    string

    Id

    Gets or Sets Id

    Declaration
    [DataMember(Name = "id", EmitDefaultValue = false)]
    [Preserve]
    public string Id { get; }
    Property Value
    Type Description
    string

    Kpi

    List of key performing indicators

    Declaration
    [DataMember(Name = "kpi", EmitDefaultValue = false)]
    [Preserve]
    public List<string> Kpi { get; set; }
    Property Value
    Type Description
    List<string>

    List of key performing indicators

    Name

    Gets or Sets Name

    Declaration
    [DataMember(Name = "name", EmitDefaultValue = false)]
    [Preserve]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Priority

    Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game override that was created first.

    Declaration
    [DataMember(Name = "priority", EmitDefaultValue = false)]
    [Preserve]
    public int Priority { get; set; }
    Property Value
    Type Description
    int

    Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game override that was created first.

    RolloutPercentage

    The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session.

    Declaration
    [DataMember(Name = "rolloutPercentage", EmitDefaultValue = false)]
    [Preserve]
    public int RolloutPercentage { get; set; }
    Property Value
    Type Description
    int

    The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session.

    StartDate

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect.

    Declaration
    [DataMember(Name = "startDate", EmitDefaultValue = false)]
    [Preserve]
    public DateTime StartDate { get; set; }
    Property Value
    Type Description
    DateTime

    Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect.

    UpdatedAt

    Gets or Sets UpdatedAt

    Declaration
    [DataMember(Name = "updatedAt", EmitDefaultValue = false)]
    [Preserve]
    public DateTime UpdatedAt { get; }
    Property Value
    Type Description
    DateTime

    Variants

    Gets or Sets Variants

    Declaration
    [DataMember(Name = "variants", EmitDefaultValue = false)]
    [Preserve]
    public List<CampaignVariants> Variants { get; set; }
    Property Value
    Type Description
    List<CampaignVariants>

    Methods

    ShouldSerializeCondition()

    Returns false as Condition should not be serialized given that it's read-only.

    Declaration
    public bool ShouldSerializeCondition()
    Returns
    Type Description
    bool

    false (boolean)

    ShouldSerializeCreatedAt()

    Returns false as CreatedAt should not be serialized given that it's read-only.

    Declaration
    public bool ShouldSerializeCreatedAt()
    Returns
    Type Description
    bool

    false (boolean)

    ShouldSerializeEnvironmentId()

    Returns false as EnvironmentId should not be serialized given that it's read-only.

    Declaration
    public bool ShouldSerializeEnvironmentId()
    Returns
    Type Description
    bool

    false (boolean)

    ShouldSerializeId()

    Returns false as Id should not be serialized given that it's read-only.

    Declaration
    public bool ShouldSerializeId()
    Returns
    Type Description
    bool

    false (boolean)

    ShouldSerializeUpdatedAt()

    Returns false as UpdatedAt should not be serialized given that it's read-only.

    Declaration
    public bool ShouldSerializeUpdatedAt()
    Returns
    Type Description
    bool

    false (boolean)

    In This Article
    • Constructors
      • Campaign(string, List<CampaignVariants>, bool, List<string>, List<string>, int, int, DateTime, DateTime, string)
    • Properties
      • Audience
      • Condition
      • CreatedAt
      • Description
      • Enabled
      • EndDate
      • EnvironmentId
      • Id
      • Kpi
      • Name
      • Priority
      • RolloutPercentage
      • StartDate
      • UpdatedAt
      • Variants
    • Methods
      • ShouldSerializeCondition()
      • ShouldSerializeCreatedAt()
      • ShouldSerializeEnvironmentId()
      • ShouldSerializeId()
      • ShouldSerializeUpdatedAt()
    Back to top
    Copyright © 2024 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)