docs.unity3d.com
    Show / Hide Table of Contents

    Class MeshTransform

    Functions for manipulating the transform of a mesh.

    Inheritance
    Object
    MeshTransform
    Namespace: UnityEngine.ProBuilder.MeshOperations
    Syntax
    public static class MeshTransform

    Methods

    CenterPivot(ProBuilderMesh, Int32[])

    Center the mesh pivot at the average of a set of vertices.

    Declaration
    public static void CenterPivot(this ProBuilderMesh mesh, int[] indexes)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    Int32[] indexes

    The indexes of the positions to average to find the new pivot.

    FreezeScaleTransform(ProBuilderMesh)

    Scale vertices and set transform.localScale to Vector3.one.

    Declaration
    public static void FreezeScaleTransform(this ProBuilderMesh mesh)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    SetPivot(ProBuilderMesh, Vector3)

    Set the pivot point of a mesh in world space. The Transform component position property is set to worldPosition, while the mesh geometry does not move.

    Declaration
    public static void SetPivot(this ProBuilderMesh mesh, Vector3 worldPosition)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    Vector3 worldPosition

    The new pivot position in world space.

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