docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PlatformToolkit

    A static entry-point interface for using PlatformToolkit.

    This interface is used to initialize the toolkit as well as get handles to major subsystems.

    Inheritance
    object
    PlatformToolkit
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.PlatformToolkit
    Assembly: Unity.PlatformToolkit.dll
    Syntax
    public static class PlatformToolkit

    Properties

    Accounts

    Get the IAccountSystem.

    Declaration
    public static IAccountSystem Accounts { get; }
    Property Value
    Type Description
    IAccountSystem
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if accounts aren't supported in the current implementation. Check that Accounts isn't null to make sure that accounts are supported.

    Also thrown if Initialize() wasn't called or completed.

    Capabilities

    Access to capabilities of the current platform.

    Declaration
    public static ICapabilities Capabilities { get; }
    Property Value
    Type Description
    ICapabilities

    LocalSaving

    A saving system that's unrelated to any account. Saves are stored locally on the device.

    On platforms that support both an account saving system and a local saving system, it's recommended to use the account saving system and only fall back on the local saving system if an account saving system is unavailable. That way different players will be able to keep their saves separate. Use GetSavingSystem() to access the account saving system.

    Use LocalSaving to check if the current platform supports local saving system.

    Declaration
    public static ISavingSystem LocalSaving { get; }
    Property Value
    Type Description
    ISavingSystem

    Methods

    Initialize()

    Initialize must be called to initialize Platform Toolkit. Platform Toolkit functionality will not work before Initialize completes. Games should call Initialize as early as possible, for example during the initial loading screen.

    Declaration
    public static Task Initialize()
    Returns
    Type Description
    Task

    Task which returns when the toolkit is initialized.

    Events

    Initialized

    Event for registering systems dependent on a Platform Toolkit implementation. Called after Initialize() successfully initializes the Platform Toolkit implementation. If the delegate is added after Platform Toolkit is initialized, it will be called shortly after adding.

    Declaration
    public static event Action Initialized
    Event Type
    Type Description
    Action
    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)