docs.unity3d.com
    Show / Hide Table of Contents

    Class ShapeFactory

    Inheritance
    Object
    ShapeFactory
    Namespace: UnityEngine.ProBuilder
    Syntax
    public static class ShapeFactory

    Methods

    Instantiate(Type, PivotLocation)

    Create a shape with default parameters.

    Declaration
    public static ProBuilderMesh Instantiate(Type shapeType, PivotLocation pivotType = PivotLocation.Center)
    Parameters
    Type Name Description
    Type shapeType

    The ShapeType to create.

    PivotLocation pivotType

    Where the shape's pivot will be.

    Returns
    Type Description
    ProBuilderMesh

    A new GameObject with the ProBuilderMesh initialized to the primitive shape.

    Instantiate(Shape, PivotLocation)

    Create a shape with default parameters.

    Declaration
    public static ProBuilderMesh Instantiate(Shape shape, PivotLocation pivotType = PivotLocation.Center)
    Parameters
    Type Name Description
    Shape shape

    The ShapeType to create.

    PivotLocation pivotType

    Where the shape's pivot will be.

    Returns
    Type Description
    ProBuilderMesh

    A new GameObject with the ProBuilderMesh initialized to the primitive shape.

    Instantiate<T>(PivotLocation)

    Create a shape with default parameters.

    Declaration
    public static ProBuilderMesh Instantiate<T>(PivotLocation pivotType = PivotLocation.Center)
        where T : Shape, new()
    Parameters
    Type Name Description
    PivotLocation pivotType

    Where the shape's pivot will be.

    Returns
    Type Description
    ProBuilderMesh

    A new GameObject with the ProBuilderMesh initialized to the primitive shape.

    Type Parameters
    Name Description
    T
    Back to top
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)