docs.unity.cn
    Show / Hide Table of Contents

    Class MousePositionDebug

    Provides mouse position for debugging purpose.

    Inheritance
    Object
    MousePositionDebug
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Rendering
    Syntax
    public class MousePositionDebug

    Properties

    instance

    Singleton instance.

    Declaration
    public static MousePositionDebug instance { get; }
    Property Value
    Type Description
    MousePositionDebug

    Methods

    Build()

    Initialize the MousePositionDebug class.

    Declaration
    public void Build()

    Cleanup()

    Cleanup the MousePositionDebug class.

    Declaration
    public void Cleanup()

    GetMouseClickPosition(Single)

    Returns the position of the mouse click.

    Declaration
    public Vector2 GetMouseClickPosition(float ScreenHeight)
    Parameters
    Type Name Description
    Single ScreenHeight

    Window height.

    Returns
    Type Description
    Vector2

    The coordinates of the mouse click.

    GetMousePosition(Single, Boolean)

    Get the mouse position in the scene or game view.

    Declaration
    public Vector2 GetMousePosition(float ScreenHeight, bool sceneView)
    Parameters
    Type Name Description
    Single ScreenHeight

    Window height.

    Boolean sceneView

    Get position in the scene view?

    Returns
    Type Description
    Vector2

    Coordinates of the mouse in the specified window.

    Extension Methods

    AnalyticsUtils.ToNestedColumn<T>(T, Boolean)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, Boolean)
    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 08 September 2023