Class ProBuilderEditor | ProBuilder | 4.3.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ProBuilderEditor

    Manages the ProBuilder toolbar window and tool mode.

    Inheritance
    Object
    ProBuilderEditor
    Namespace: UnityEditor.ProBuilder
    Syntax
    public sealed class ProBuilderEditor : EditorWindow, IHasCustomMenu

    Properties

    instance

    Declaration
    public static ProBuilderEditor instance { get; }
    Property Value
    Type Description
    ProBuilderEditor

    Get the active ProBuilderEditor window. Null if no instance is open.

    selectMode

    Declaration
    public static SelectMode selectMode { get; set; }
    Property Value
    Type Description
    SelectMode

    Get and set the current SelectMode.

    Methods

    AddItemsToMenu(GenericMenu)

    Declaration
    public void AddItemsToMenu(GenericMenu menu)
    Parameters
    Type Name Description
    GenericMenu menu

    Refresh(Boolean)

    Rebuild the mesh wireframe and selection caches.

    Declaration
    public static void Refresh(bool vertexCountChanged = true)
    Parameters
    Type Name Description
    Boolean vertexCountChanged

    Events

    afterMeshModification

    Declaration
    public static event Action<IEnumerable<ProBuilderMesh>> afterMeshModification
    Event Type
    Type Description
    Action<IEnumerable<ProBuilderMesh>>

    Called when vertex modifications are complete.

    beforeMeshModification

    Declaration
    public static event Action<IEnumerable<ProBuilderMesh>> beforeMeshModification
    Event Type
    Type Description
    Action<IEnumerable<ProBuilderMesh>>

    Called immediately prior to beginning vertex modifications. The ProBuilderMesh will be in un-altered state at this point (meaning ProBuilderMesh.ToMesh and ProBuilderMesh.Refresh have been called, but not Optimize).

    selectionUpdated

    Declaration
    public static event Action<IEnumerable<ProBuilderMesh>> selectionUpdated
    Event Type
    Type Description
    Action<IEnumerable<ProBuilderMesh>>

    Raised any time the ProBuilder editor refreshes the selection. This is called every frame when interacting with mesh elements, and after any mesh operation.

    selectModeChanged

    Declaration
    public static event Action<SelectMode> selectModeChanged
    Event Type
    Type Description
    Action<SelectMode>

    Raised when the EditLevel is changed.

    Back to top
    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