TerrainPaintToolWithOverlaysBase
The abstract class that TerrainPaintToolWithOverlays inherits from.
Read time 5 minutesLast updated 12 days ago
Definition
- Type: Class
- Namespace: UnityEditor.TerrainTools
- Assembly: UnityEditor
- Inherits from: EditorTool
public abstract class TerrainPaintToolWithOverlaysBase : EditorTool
Remarks
Contains fields that can be overridden when you implement your own terrain painting tools to display in Terrain overlays. When you create custom Terrain Tools, they must inherit from the TerrainPaintToolWithOverlays<T> class rather than this class.
Properties
Property | Description |
|---|---|
| Category | The TerrainCategory that the Terrain Tool belongs to. |
| HasBrushAttributes | True if the Terrain Tool has brush attributes, false otherwise. |
| HasBrushMask | True if Terrain Tool has brush masks, false otherwise. |
| HasToolSettings | True if Terrain Tool has custom settings, false otherwise. |
| IconIndex | The index at which you should place the Terrain Tool in the Terrain Tools overlay. |
| OffIcon | The icon displayed in the Terrain Tools overlay when the Terrain Tool isn't selected. |
| OnIcon | The icon displayed in the Terrain Tools overlay when the terrain tool is selected. |
| Terrain | The last hit terrain or the last active instance of a terrain object. |
Methods
Method | Description |
|---|---|
| GetDescription | Description of the Terrain Tool. |
| GetName | Name of the Terrain Tool. |
| OnActivated | This function is called when the tool is activated. |
| OnDisable | Called when the tool is destroyed. |
| OnEnable | Called when the tool is created. |
| OnEnterToolMode | This function is called when the Terrain Tool is activated. |
| OnExitToolMode | This function is called when the Terrain Tool becomes inactive. |
| OnInspectorGUI | Custom Terrain Tool OnInspectorGUI callback. |
| OnPaint | Custom Terrain Tool paint callback. |
| OnRenderBrushPreview | Use this method to implement custom tool preview and UI behavior that only renders while the mouse is within the SceneView bounds or while you're actively using this tool. |
| OnSceneGUI | Custom Terrain Tool OnSceneGUI callback. |
| OnToolGUI | This method is used to implement the custom terrain editor paint tool. |
| OnToolSettingsGUI | Contains the IMGUI code for custom settings beyond the common settings. |
| OnWillBeDeactivated | Invoked before the terrain paint tool with overlays stops being the active tool. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |