docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IBrushController

    An interface that represents a brush's controller.

    Namespace: UnityEditor.TerrainTools
    Assembly: Unity.TerrainTools.Editor.dll
    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
    bool
    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    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
    Terrain terrain

    The Terrain in focus.

    IOnSceneGUI editContext

    The UnityEditor.TerrainTools.IOnSceneGUI to reference.

    StringBuilder builder

    The StringBuilder containing the brush information.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    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.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    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.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    OnInspectorGUI(Terrain, IOnInspectorGUI)

    Triggers events to render objects and displays within Scene view.

    Declaration
    void OnInspectorGUI(Terrain terrain, IOnInspectorGUI editContext)
    Parameters
    Type Name Description
    Terrain terrain

    The terrain in focus.

    IOnInspectorGUI editContext

    The editcontext to reference.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    OnPaint(Terrain, IOnPaint)

    Triggers events when painting on a terrain.

    Declaration
    bool OnPaint(Terrain terrain, IOnPaint editContext)
    Parameters
    Type Name Description
    Terrain terrain

    The Terrain in focus.

    IOnPaint editContext

    The editcontext to reference.

    Returns
    Type Description
    bool

    Returns true if the paint operation is succesful. Otherwise, returns false.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    OnSceneGUI(Event, int, 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
    Event currentEvent

    The event state within the OnSceneGUI call.

    int controlId

    The control identification of the OnSceneGUI

    Terrain terrain

    The terrain in focus.

    IOnSceneGUI editContext

    The editcontext to reference.

    See Also
    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController

    See Also

    IBrushStrengthController
    IBrushSizeController
    IBrushRotationController
    IBrushScatterController
    IBrushSpacingController
    IBrushSmoothController
    IBrushModifierKeyController
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)