Class Draw2D | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Draw2D

    Inheritance
    System.Object
    Draw2D
    Namespace: UnityEditor.Performance.ProfileAnalyzer
    Syntax
    public class Draw2D

    Constructors

    Draw2D(String)

    Declaration
    public Draw2D(string shaderName)
    Parameters
    Type Name Description
    System.String shaderName

    Methods

    CheckAndSetupMaterial()

    Declaration
    public bool CheckAndSetupMaterial()
    Returns
    Type Description
    System.Boolean

    ClearClipRect()

    Declaration
    public void ClearClipRect()

    DrawBox(Single, Single, Single, Single, Color)

    Declaration
    public void DrawBox(float x, float y, float w, float h, Color col)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single w
    System.Single h
    Color col

    DrawBox(Single, Single, Single, Single, Single, Single, Single)

    Declaration
    public void DrawBox(float x, float y, float w, float h, float r, float g, float b)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single w
    System.Single h
    System.Single r
    System.Single g
    System.Single b

    DrawEnd()

    Declaration
    public void DrawEnd()

    DrawFilledBox(Single, Single, Single, Single, Color)

    Declaration
    public void DrawFilledBox(float x, float y, float w, float h, Color col)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single w
    System.Single h
    Color col

    DrawFilledBox(Single, Single, Single, Single, Single, Single, Single)

    Declaration
    public void DrawFilledBox(float x, float y, float w, float h, float r, float g, float b)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single w
    System.Single h
    System.Single r
    System.Single g
    System.Single b

    DrawLine(Single, Single, Single, Single, Color)

    Declaration
    public void DrawLine(float x, float y, float x2, float y2, Color col)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single x2
    System.Single y2
    Color col

    DrawLine(Single, Single, Single, Single, Single, Single, Single)

    Declaration
    public void DrawLine(float x, float y, float x2, float y2, float r, float g, float b)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single x2
    System.Single y2
    System.Single r
    System.Single g
    System.Single b

    DrawStart(Rect, Draw2D.Origin)

    Declaration
    public bool DrawStart(Rect r, Draw2D.Origin origin = Draw2D.Origin.TopLeft)
    Parameters
    Type Name Description
    Rect r
    Draw2D.Origin origin
    Returns
    Type Description
    System.Boolean

    DrawStart(Single, Single, Draw2D.Origin, GUIStyle)

    Declaration
    public bool DrawStart(float w, float h, Draw2D.Origin origin = Draw2D.Origin.TopLeft, GUIStyle style = null)
    Parameters
    Type Name Description
    System.Single w
    System.Single h
    Draw2D.Origin origin
    GUIStyle style
    Returns
    Type Description
    System.Boolean

    IsMaterialValid()

    Declaration
    public bool IsMaterialValid()
    Returns
    Type Description
    System.Boolean

    OnGUI()

    Declaration
    public void OnGUI()

    SetClipRect(Rect)

    Declaration
    public void SetClipRect(Rect clipRect)
    Parameters
    Type Name Description
    Rect clipRect

    Translate(ref Single, ref Single)

    Declaration
    public void Translate(ref float x, ref float y)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    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