docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PlatformToolkitEditor

    Provides access to Platform Toolkit settings for the editor. Also provides a public API for managing Platform Toolkit configurations at the project level. This allows programmatically setting and querying which Platform Toolkit implementation is active for different Unity build targets. Useful for build pipelines and custom tooling.

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

    Methods

    GetAvailableImplementations()

    Gets a list of all available Platform Toolkit implementations (support declarations) detected in the project.

    Declaration
    public static IReadOnlyList<PlatformToolkitEditor.PlatformToolkitImplementationInfo> GetAvailableImplementations()
    Returns
    Type Description
    IReadOnlyList<PlatformToolkitEditor.PlatformToolkitImplementationInfo>

    A read-only list of PlatformToolkitEditor.PlatformToolkitImplementationInfo for all available implementations.

    SetImplementation(BuildTarget, string)

    Configures a specific Platform Toolkit implementation to be used for a given Unity BuildTarget. This will overwrite any existing configuration for the specified build target.

    Declaration
    public static bool SetImplementation(BuildTarget buildTarget, string key)
    Parameters
    Type Name Description
    BuildTarget buildTarget

    The Unity BuildTarget to configure (e.g., BuildTarget.Android, BuildTarget.iOS).

    string key

    The unique key of the Platform Toolkit implementation to use for that build target. Use GetAvailableImplementations() to find valid implementation keys.

    Returns
    Type Description
    bool

    True if the configuration was successfully set, updated, or is already set to that implementation.

    False if the declaration key is invalid, or if the specified implementation does not support the given build target.

    TryGetImplementationInfo(BuildTarget, out PlatformToolkitImplementationInfo)

    Tries to get the PlatformToolkitEditor.PlatformToolkitImplementationInfo currently configured for a specific Unity BuildTarget.

    Declaration
    public static bool TryGetImplementationInfo(BuildTarget buildTarget, out PlatformToolkitEditor.PlatformToolkitImplementationInfo info)
    Parameters
    Type Name Description
    BuildTarget buildTarget

    The Unity BuildTarget to query.

    PlatformToolkitEditor.PlatformToolkitImplementationInfo info

    When this method returns, contains the info of the configured Platform Toolkit implementation, or null if no implementation info is found for the given build target.

    Returns
    Type Description
    bool

    True if an implementations info was found for the specified build target; otherwise, false.

    TryGetSettings<TSettings>(out TSettings)

    Get an editable instance of project settings for a Platform Toolkit implementation.

    Declaration
    public static bool TryGetSettings<TSettings>(out TSettings settings)
    Parameters
    Type Name Description
    TSettings settings

    Settings object.

    Returns
    Type Description
    bool

    True, if an implementation is found that is using TSettings as its settings type.

    False, if no implementation is found that would be using TSettings as its settings type.

    Type Parameters
    Name Description
    TSettings

    Type of settings to be retrieved.

    Remarks

    Platform Toolkit implementation may expose a settings type, in which case an object of that type will be retrievable via this method.

    Settings type for each implementation is documented in the corresponding implementation documentation.

    In This Article
    Back to top
    Copyright © 2026 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)