docs.unity3d.com
    Show / Hide Table of Contents

    Class DefaultSerializer

    Standard serializer used by the GameNotificationsManager if no others are provided. Saves a simple binary format.

    Inheritance
    Object
    DefaultSerializer
    Namespace: NotificationSamples
    Syntax
    public class DefaultSerializer : IPendingNotificationsSerializer

    Constructors

    DefaultSerializer(String)

    Instantiate a new instance of DefaultSerializer.

    Declaration
    public DefaultSerializer(string filename)
    Parameters
    Type Name Description
    String filename

    The filename to save to. This should be an absolute path.

    Methods

    Deserialize(IGameNotificationsPlatform)

    Retrieve a saved list of pending notifications.

    Declaration
    public IList<IGameNotification> Deserialize(IGameNotificationsPlatform platform)
    Parameters
    Type Name Description
    IGameNotificationsPlatform platform
    Returns
    Type Description
    IList<IGameNotification>

    The deserialized collection of pending notifications, or null if the file did not exist.

    Implements
    IPendingNotificationsSerializer.Deserialize(IGameNotificationsPlatform)

    Serialize(IList<PendingNotification>)

    Save a list of pending notifications.

    Declaration
    public void Serialize(IList<PendingNotification> notifications)
    Parameters
    Type Name Description
    IList<PendingNotification> notifications

    The collection notifications to save.

    Implements
    IPendingNotificationsSerializer.Serialize(IList<PendingNotification>)
    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