docs.unity3d.com
    Show / Hide Table of Contents

    Class Platform

    Utility methods and properties related to the Target Platform.

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

    Fields

    baseDpi

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

    Properties

    isTouchGestureSupported

    Whether the current platform supports touch gestures.

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

    magnificationGesture

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

    magnificationGestureChangedThisFrame

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

    mainScreenScale

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

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

    panGesture

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

    panGestureChangedThisFrame

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

    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
    Single

    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

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

    panGestureChanged

    Declaration
    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>
    Back to top
    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