docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MousePositionDebug

    Provides mouse position for debugging purpose.

    Inheritance
    object
    MousePositionDebug
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    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(float)

    Returns the position of the mouse click.

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

    Window height.

    Returns
    Type Description
    Vector2

    The coordinates of the mouse click.

    GetMousePosition(float, bool)

    Get the mouse position in the scene or game view.

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

    Window height.

    bool sceneView

    Get position in the scene view?

    Returns
    Type Description
    Vector2

    Coordinates of the mouse in the specified window.

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2024 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)