Class ProBuilderEditor
Manages the ProBuilder toolbar and tool mode.
Implements
Inherited Members
Namespace: UnityEditor.ProBuilder
Assembly: solution.dll
Syntax
public sealed class ProBuilderEditor : IDisposable
Properties
instance
Declaration
public static ProBuilderEditor instance { get; }
Property Value
| Type | Description |
|---|---|
| ProBuilderEditor |
selectMode
Gets and sets the current SelectMode value.
Declaration
public static SelectMode selectMode { get; set; }
Property Value
| Type | Description |
|---|---|
| SelectMode |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
OnSceneGUI(SceneView)
Declaration
public void OnSceneGUI(SceneView sceneView)
Parameters
| Type | Name | Description |
|---|---|---|
| SceneView | sceneView |
Refresh(bool)
Rebuilds the mesh wireframe and selection caches.
Declaration
public static void Refresh(bool vertexCountChanged = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | vertexCountChanged | True if the number of vertices changed, which is the default value. |
Events
afterMeshModification
Raised when vertex modifications are complete.
Declaration
public static event Action<IEnumerable<ProBuilderMesh>> afterMeshModification
Event Type
| Type | Description |
|---|---|
| Action<IEnumerable<ProBuilderMesh>> |
beforeMeshModification
Raised immediately prior to beginning vertex modifications, when the ProBuilderMesh is in un-altered state. This is after ToMesh(MeshTopology) and Refresh(RefreshMask) have been called, but before Optimize(ProBuilderMesh, bool).
Declaration
public static event Action<IEnumerable<ProBuilderMesh>> beforeMeshModification
Event Type
| Type | Description |
|---|---|
| Action<IEnumerable<ProBuilderMesh>> |
selectModeChanged
Raised when the EditLevel changes.
Declaration
public static event Action<SelectMode> selectModeChanged
Event Type
| Type | Description |
|---|---|
| Action<SelectMode> |
selectionUpdated
Raised any time the ProBuilder editor refreshes the selection. This is called every frame when interacting with mesh elements, and after any mesh operation.
Declaration
public static event Action<IEnumerable<ProBuilderMesh>> selectionUpdated
Event Type
| Type | Description |
|---|---|
| Action<IEnumerable<ProBuilderMesh>> |