docs.unity3d.com
    Show / Hide Table of Contents

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

    The Terrain in focus.

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

    The terrain in focus.

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

    The Terrain in focus.

    IOnPaint editContext

    The editcontext to reference.

    Returns
    Type Description
    Boolean

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

    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
    Event currentEvent

    The event state within the OnSceneGUI call.

    Int32 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
    Back to top
    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on Friday, November 3, 2023