docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CustomUpdatePayload

    Represents a custom update for UpdateAsync(CustomUpdatePayload). Note that if localized content is not provided, a Facebook supplied localized string will be used for the call to action and text.The default string should always be in English.

    Inheritance
    object
    JsObject
    CustomUpdatePayload
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Meta.InstantGames
    Assembly: Unity.Meta.InstantGames.Sdk.dll
    Syntax
    public class CustomUpdatePayload : JsObject

    Constructors

    CustomUpdatePayload()

    Construct an instance of CustomUpdatePayload

    Declaration
    public CustomUpdatePayload()

    CustomUpdatePayload(UpdateAction, string, LocalizableContent, LocalizableContent, string, string, UpdateStrategy?, UpdateNotification?)

    Creates a new instance of CustomUpdatePayload

    Declaration
    public CustomUpdatePayload(UpdateAction action, string template, LocalizableContent text, LocalizableContent cta = null, string image = null, string data = null, UpdateStrategy? strategy = null, UpdateNotification? notification = null)
    Parameters
    Type Name Description
    UpdateAction action

    For custom updates, this should be CUSTOM.

    string template

    ID of the template this custom update uses. Predefine templates in fbapp-config.json. Refer to the Bundle Config documentation for information about fbapp-config.json.

    LocalizableContent text

    A message to be sent for the user.

    LocalizableContent cta

    Optional call-to-action button text. The default button text is a localized version of Play.

    string image

    Optional data URL of a Base64-encoded image.

    string data

    An optional blob of data to attach to the update, serialized as a JSON string. This string must represent a JSON object such as {"key": "value"} and be no more than 1,000 characters. All game sessions launched from the update can access this blob through GetEntryPointData().

    UpdateStrategy? strategy

    Specifies how the update is delivered. If no strategy is specified, defaults to IMMEDIATE.

    UpdateNotification? notification

    Specifies notification setting for the custom update. Defaults to 'NO_PUSH'.

    Properties

    Action

    For custom updates, this should be CUSTOM.

    Declaration
    public UpdateAction Action { get; }
    Property Value
    Type Description
    UpdateAction

    Cta

    Optional call-to-action button text. The default button text is a localized version of Play.

    Declaration
    public LocalizableContent Cta { get; }
    Property Value
    Type Description
    LocalizableContent

    Data

    An optional blob of data to attach to the update, serialized as a JSON string. This string must represent a JSON object such as {"key": "value"} and be no more than 1,000 characters. All game sessions launched from the update can access this blob through GetEntryPointData().

    Declaration
    public string Data { get; }
    Property Value
    Type Description
    string

    Image

    Optional data URL of a Base64-encoded image.

    Declaration
    public string Image { get; }
    Property Value
    Type Description
    string

    Notification

    Specifies notification setting for the custom update. Defaults to 'NO_PUSH'.

    Declaration
    public UpdateNotification? Notification { get; }
    Property Value
    Type Description
    UpdateNotification?

    Strategy

    Specifies how the update is delivered. If no strategy is specified, defaults to IMMEDIATE.

    Declaration
    public UpdateStrategy? Strategy { get; }
    Property Value
    Type Description
    UpdateStrategy?

    Template

    ID of the template this custom update uses. Predefine templates in fbapp-config.json. Refer to the Bundle Config documentation for information about fbapp-config.json.

    Declaration
    public string Template { get; }
    Property Value
    Type Description
    string

    Text

    A message to be sent for the user.

    Declaration
    public LocalizableContent Text { get; }
    Property Value
    Type Description
    LocalizableContent
    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)