Class ProBuilderEditor | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class ProBuilderEditor

    Manages the ProBuilder toolbar window and tool mode.

    Inheritance
    System.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
    System.Boolean vertexCountChanged

    Events

    afterMeshModification

    Declaration
    public static event Action<IEnumerable<ProBuilderMesh>> afterMeshModification
    Event Type
    Type Description
    System.Action<System.Collections.Generic.IEnumerable<ProBuilderMesh>>

    Called when vertex modifications are complete.

    beforeMeshModification

    Declaration
    public static event Action<IEnumerable<ProBuilderMesh>> beforeMeshModification
    Event Type
    Type Description
    System.Action<System.Collections.Generic.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
    System.Action<System.Collections.Generic.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
    System.Action<SelectMode>

    Raised when the EditLevel is changed.

    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX