docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DebugDraw

    Helpers for drawing shapes for debugging purposes.

    Inheritance
    object
    DebugDraw
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.XR.CoreUtils
    Assembly: Unity.XR.CoreUtils.dll
    Syntax
    public static class DebugDraw

    Methods

    Polygon(List<Vector3>, Color, float)

    Draws a line around a polygonal shape.

    Declaration
    public static void Polygon(List<Vector3> vertices, Color color, float duration = 10)
    Parameters
    Type Name Description
    List<Vector3> vertices

    Polygon made of a series of adjacent points in world space.

    Color color

    Color of the line.

    float duration

    How long the line should be visible for.

    Polygon(Vector3[], Color, float)

    Draws a line following a set of points.

    Declaration
    public static void Polygon(Vector3[] vertices, Color color, float duration = 10)
    Parameters
    Type Name Description
    Vector3[] vertices

    Polygon made of a series of adjacent points in world space.

    Color color

    Color of the line.

    float duration

    How long the line should be visible for.

    Remarks

    Connects the points in vertices in order and closes the polygon by connecting the last point to the first.

    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)