Class PolyShape | ProBuilder | 4.3.1
docs.unity.cn
    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)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX