docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method BuildCustomSphereMesh

    BuildCustomSphereMesh(float, uint, uint)

    Builds a custom Sphere Mesh

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

    The radius of the generated sphere.

    uint longSubdiv

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

    uint 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
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)