Interface IBrushController
An interface that represents a brush's controller.
Namespace: UnityEditor.TerrainTools
Syntax
public interface IBrushController
Remarks
This interface is used for implementing custom controllers for handling brush properties.
Properties
isInUse
Determines if the brush controller is in use.
Declaration
bool isInUse { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
AppendBrushInfo(Terrain, IOnSceneGUI, StringBuilder)
Adds basic information to the selected brush.
Declaration
void AppendBrushInfo(Terrain terrain, IOnSceneGUI editContext, StringBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Terrain | terrain | The UnityEngine.Terrain in focus. |
UnityEditor.TerrainTools.IOnSceneGUI | editContext | The UnityEditor.TerrainTools.IOnSceneGUI to reference. |
StringBuilder | builder | The StringBuilder containing the brush information. |
OnEnterToolMode(BrushShortcutHandler<BrushShortcutType>)
Defines data when the brush is selected.
Declaration
void OnEnterToolMode(BrushShortcutHandler<BrushShortcutType> shortcutHandler)
Parameters
Type | Name | Description |
---|---|---|
BrushShortcutHandler<BrushShortcutType> | shortcutHandler | The shortcut handler used to add and refernce shortcuts. |
OnExitToolMode(BrushShortcutHandler<BrushShortcutType>)
Defines data when the brush is deselected.
Declaration
void OnExitToolMode(BrushShortcutHandler<BrushShortcutType> shortcutHandler)
Parameters
Type | Name | Description |
---|---|---|
BrushShortcutHandler<BrushShortcutType> | shortcutHandler | The shortcut handler used to add and refernce shortcuts. |
OnInspectorGUI(Terrain, IOnInspectorGUI)
Triggers events to render objects and displays within Scene view.
Declaration
void OnInspectorGUI(Terrain terrain, IOnInspectorGUI editContext)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Terrain | terrain | The terrain in focus. |
UnityEditor.TerrainTools.IOnInspectorGUI | editContext | The editcontext to reference. |
OnPaint(Terrain, IOnPaint)
Triggers events when painting on a terrain.
Declaration
bool OnPaint(Terrain terrain, IOnPaint editContext)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Terrain | terrain | The UnityEngine.Terrain in focus. |
UnityEditor.TerrainTools.IOnPaint | editContext | The editcontext to reference. |
Returns
Type | Description |
---|---|
Boolean | Returns |
OnSceneGUI(Event, Int32, Terrain, IOnSceneGUI)
Triggers events to render objects and displays within Scene view.
Declaration
void OnSceneGUI(Event currentEvent, int controlId, Terrain terrain, IOnSceneGUI editContext)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Event | currentEvent | The event state within the OnSceneGUI call. |
Int32 | controlId | The control identification of the OnSceneGUI |
UnityEngine.Terrain | terrain | The terrain in focus. |
UnityEditor.TerrainTools.IOnSceneGUI | editContext | The editcontext to reference. |