docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Platform

    Utility methods and properties related to the Target Platform.

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

    Fields

    baseDpi

    The base DPI value used in PanelSettings.

    Declaration
    public const float baseDpi = 96
    Field Value
    Type Description
    float

    Properties

    isTouchGestureSupported

    Whether the current platform supports touch gestures.

    Declaration
    public static bool isTouchGestureSupported { get; set; }
    Property Value
    Type Description
    bool

    magnificationGesture

    The magnification gesture data.

    Declaration
    [Obsolete]
    public static MagnificationGesture magnificationGesture { get; }
    Property Value
    Type Description
    MagnificationGesture

    magnificationGestureChangedThisFrame

    Whether the magnification gesture has changed this frame.

    Declaration
    [Obsolete]
    public static bool magnificationGestureChangedThisFrame { get; set; }
    Property Value
    Type Description
    bool

    mainScreenScale

    The main screen scale factor.

    Declaration
    public static float mainScreenScale { get; }
    Property Value
    Type Description
    float
    Remarks

    The "main" screen is the current screen used at highest priority to display the application window.

    panGesture

    The pan gesture data.

    Declaration
    [Obsolete]
    public static PanGesture panGesture { get; }
    Property Value
    Type Description
    PanGesture

    panGestureChangedThisFrame

    Whether the pan gesture has changed this frame.

    Declaration
    [Obsolete]
    public static bool panGestureChangedThisFrame { get; set; }
    Property Value
    Type Description
    bool

    referenceDpi

    The DPI value that should be used in UI-Toolkit PanelSettings referenceDpi.

    This value is the value of dpi divided by the main screen scale factor.

    Declaration
    public static float referenceDpi { get; }
    Property Value
    Type Description
    float

    systemTheme

    The current system theme.

    Declaration
    public static string systemTheme { get; }
    Property Value
    Type Description
    string

    Methods

    RunHapticFeedback(HapticFeedbackType)

    Run a haptic feedback on the current platform.

    Declaration
    public static void RunHapticFeedback(HapticFeedbackType feedbackType)
    Parameters
    Type Name Description
    HapticFeedbackType feedbackType

    The type of haptic feedback to trigger.

    Events

    magnificationGestureChanged

    Event triggered when a magnification gesture is received.

    Declaration
    [Obsolete]
    public static event Action<MagnificationGesture> magnificationGestureChanged
    Event Type
    Type Description
    Action<MagnificationGesture>

    panGestureChanged

    Event triggered when a pan gesture is received.

    Declaration
    [Obsolete]
    public static event Action<PanGesture> panGestureChanged
    Event Type
    Type Description
    Action<PanGesture>

    systemThemeChanged

    Event triggered when the system theme changes.

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