docs.unity.cn
    Show / Hide Table of Contents

    Class DebugShapes

    Debug class containing several debug shapes for debugging

    Inheritance
    Object
    DebugShapes
    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 DebugShapes

    Properties

    instance

    Singleton instance

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

    Methods

    BuildCustomSphereMesh(Single, UInt32, UInt32)

    Builds a custom Sphere Mesh

    Declaration
    public Mesh BuildCustomSphereMesh(float radius, uint longSubdiv, uint latSubdiv)
    Parameters
    Type Name Description
    Single radius

    The radius of the generated sphere.

    UInt32 longSubdiv

    The number of subdivisions along the equator of the sphere. Must be at least 3 to give a relevant shape.

    UInt32 latSubdiv

    The number of subdivisions from north to south. Must be at least 1 to give a relevant shape.

    Returns
    Type Description
    Mesh

    A Sphere Mesh

    Examples
    Mesh lowPolyDebugMesh = DebugShapes.instance.BuildCustomSphereMesh(0.5f, 9, 8); // Generates a 82 vert sphere

    RequestBoxMesh()

    Get a Box Mesh

    Declaration
    public Mesh RequestBoxMesh()
    Returns
    Type Description
    Mesh

    A Box Mesh

    RequestConeMesh()

    Get a Cone Mesh

    Declaration
    public Mesh RequestConeMesh()
    Returns
    Type Description
    Mesh

    A Cone Mesh

    RequestPyramidMesh()

    Get a Pyramid Mesh

    Declaration
    public Mesh RequestPyramidMesh()
    Returns
    Type Description
    Mesh

    A Pyramid Mesh

    RequestSphereMesh()

    Get a Sphere Mesh

    Declaration
    public Mesh RequestSphereMesh()
    Returns
    Type Description
    Mesh

    A Sphere Mesh

    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