docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RuntimePlatformExtensions

    Extension methods for the RuntimePlatform enum.

    Inheritance
    object
    RuntimePlatformExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.TestTools.Graphics.Platforms
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public static class RuntimePlatformExtensions

    Methods

    ToBuildTarget(RuntimePlatform)

    Converts the RuntimePlatform to a BuildTarget.

    Declaration
    public static BuildTarget ToBuildTarget(this RuntimePlatform platform)
    Parameters
    Type Name Description
    RuntimePlatform platform

    The RuntimePlatform to convert.

    Returns
    Type Description
    BuildTarget

    The BuildTarget equivalent of the RuntimePlatform.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when the RuntimePlatform is unknown.

    ToUniqueString(RuntimePlatform, Architecture)

    Converts the RuntimePlatform to a unique string value.

    Declaration
    public static string ToUniqueString(this RuntimePlatform platform, Architecture architecture)
    Parameters
    Type Name Description
    RuntimePlatform platform

    The RuntimePlatform to convert.

    Architecture architecture

    The architecture of the platform.

    Returns
    Type Description
    string

    A unique string value for the RuntimePlatform.

    Remarks

    This method is required to generate backward compatible unique string values for duplicated RuntimePlatform enum values.

    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)