docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EditorMeshUtility

    Contains helper functions for mesh editing that are only available in the Editor.

    Inheritance
    object
    EditorMeshUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.ProBuilder
    Assembly: Unity.ProBuilder.Editor.dll
    Syntax
    public static class EditorMeshUtility

    Methods

    Optimize(ProBuilderMesh, bool)

    Optimizes the mesh geometry, and generates a UV2 channel if object is marked as ContributeGI or you set the generateLightmapUVs parameter to true.

    Declaration
    public static void Optimize(this ProBuilderMesh mesh, bool generateLightmapUVs = false)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The ProBuilder mesh component to optimize.

    bool generateLightmapUVs

    True to force ProBuilder to build UV2s if the Auto UV2 preference is disabled.

    Remarks

    This is only applicable to meshes with triangle topology. Quad meshes are not affected by this function.

    RebuildColliders(ProBuilderMesh)

    Resizes any collider components on this mesh to match the size of the mesh bounds.

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

    The mesh target to rebuild collider volumes for.

    Events

    meshOptimized

    Raised after a ProBuilderMesh has been successfully optimized.

    Declaration
    public static event Action<ProBuilderMesh, Mesh> meshOptimized
    Event Type
    Type Description
    Action<ProBuilderMesh, Mesh>
    See Also
    Optimize(ProBuilderMesh, bool)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)