docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateRoundedCornerSquare

    CreateRoundedCornerSquare(float, float)

    Creates a Spline in the shape of a square with circular arcs at its corners.

    Declaration
    public static Spline CreateRoundedCornerSquare(float size, float cornerRadius)
    Parameters
    Type Name Description
    float size

    The size of the square's edges.

    float cornerRadius

    The radius of the circular arcs at the corners of the shape. A value of 0 creates a square with no rounding. A value that is half of size creates a circle.

    Returns
    Type Description
    Spline

    A new Spline.

    Remarks

    The range for cornerRadius is 0 and half of size.

    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)