docs.unity3d.com
    Show / Hide Table of Contents

    Class PushNotificationSettings

    A class for configuring the Push Notifications SDK.

    Some of the fields in this class are platform specific, and are prefixed with the platform they relate to. However, it is not required to use a separate settings object on each platform, as the SDK will automatically only retrieve settings for the platform it is running on.

    Inheritance
    Object
    PushNotificationSettings
    Namespace: Unity.Services.PushNotifications
    Syntax
    public class PushNotificationSettings : ScriptableObject

    Fields

    androidApiKey

    Declaration
    public string androidApiKey
    Field Value
    Type Description
    String

    androidApplicationId

    Declaration
    public string androidApplicationId
    Field Value
    Type Description
    String

    androidProjectId

    Declaration
    public string androidProjectId
    Field Value
    Type Description
    String

    androidSenderId

    Declaration
    public string androidSenderId
    Field Value
    Type Description
    String

    Properties

    AndroidApiKey

    The Firebase API Key for the project to use for Firebase Cloud Messaging. This should match the project you have configured in the Push Notification dashboard.

    Declaration
    public string AndroidApiKey { get; set; }
    Property Value
    Type Description
    String

    AndroidApplicationId

    The Firebase application ID for the project to use for Firebase Cloud Messaging. This should match the project you have configured in the Push Notification dashboard.

    Declaration
    public string AndroidApplicationId { get; set; }
    Property Value
    Type Description
    String

    AndroidProjectId

    The Firebase project ID for the project to use for Firebase Cloud Messaging. This should match the project you have configured in the Push Notification dashboard.

    Declaration
    public string AndroidProjectId { get; set; }
    Property Value
    Type Description
    String

    AndroidSenderId

    The Firebase sender ID for the project to use for Firebase Cloud Messaging. This should match the project you have configured in the Push Notification dashboard.

    Declaration
    public string AndroidSenderId { get; set; }
    Property Value
    Type Description
    String

    Methods

    GetAssetInstance()

    Retrieves the copy of the settings persisted as an asset. Will return an empty settings object if no asset is available. The settings in this asset can be updated in the Editor from Project Settings > Services > Push Notifications.

    Declaration
    public static PushNotificationSettings GetAssetInstance()
    Returns
    Type Description
    PushNotificationSettings

    The settings persisted as an asset in the project, or a blank object if no settings are persisted.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023