docs.unity3d.com
    Show / Hide Table of Contents

    Class Prism

    Represents a basic prism shape.

    Inheritance
    Object
    Shape
    Prism
    Inherited Members
    Shape.UpdateBounds(ProBuilderMesh, Vector3, Quaternion, Bounds)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.ProBuilder.Shapes
    Syntax
    [Shape("Prism")]
    public class Prism : Shape

    Methods

    CopyShape(Shape)

    Overwrites this shape's property values by copying them from the specified Shape object.

    Declaration
    public override void CopyShape(Shape shape)
    Parameters
    Type Name Description
    Shape shape

    The Shape to copy property values from.

    Overrides
    Shape.CopyShape(Shape)

    RebuildMesh(ProBuilderMesh, Vector3, Quaternion)

    Rebuilds the specified mesh using the existing property values for this shape. This includes building a list of vertices and normals for each face, applying smoothing to the faces if required, and calculating the bounds of the mesh.

    Declaration
    public override Bounds RebuildMesh(ProBuilderMesh mesh, Vector3 size, Quaternion rotation)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The mesh to rebuild.

    Vector3 size

    The position of the opposite corner of the bounding box for this shape.

    Quaternion rotation

    The rotation (orientation) to use for this mesh.

    Returns
    Type Description
    Bounds

    The bounds calculated for this shape after rebuilding it.

    Overrides
    Shape.RebuildMesh(ProBuilderMesh, Vector3, Quaternion)
    Back to top
    Terms of use
    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