Class PolyShape | ProBuilder | 4.4.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class PolyShape

    PolyShape is a component that handles the creation of ProBuilderMesh shapes from a set of contiguous points.

    Inheritance
    Object
    PolyShape
    Namespace: UnityEngine.ProBuilder
    Syntax
    public sealed class PolyShape : MonoBehaviour

    Properties

    controlPoints

    Declaration
    public ReadOnlyCollection<Vector3> controlPoints { get; }
    Property Value
    Type Description
    ReadOnlyCollection<Vector3>

    Get the points that form the path for the base of this shape.

    extrude

    Declaration
    public float extrude { get; set; }
    Property Value
    Type Description
    Single

    Set the distance that this shape should extrude from the base. After setting this value, you will need to invoke CreateShapeFromPolygon(PolyShape) to rebuild the ProBuilderMesh component.

    flipNormals

    Declaration
    public bool flipNormals { get; set; }
    Property Value
    Type Description
    Boolean

    Defines what direction the normals of this shape will face. Use this to invert the normals, creating a volume with the normals facing inwards.

    Methods

    SetControlPoints(IList<Vector3>)

    Set the points that form the path for the base of this shape.

    Declaration
    public void SetControlPoints(IList<Vector3> points)
    Parameters
    Type Name Description
    IList<Vector3> points

    Extension Methods

    AppendElements.CreateShapeFromPolygon(PolyShape)
    In This Article
    • Properties
      • controlPoints
      • extrude
      • flipNormals
    • Methods
      • SetControlPoints(IList<Vector3>)
    • Extension Methods
    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