docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IBrushSmoothController

    An interface that represent the controller for smoothing the brush.

    Namespace: UnityEditor.TerrainTools
    Assembly: Unity.TerrainTools.Editor.dll
    Syntax
    public interface IBrushSmoothController

    Properties

    active

    Checks if the smooth controller is active.

    Declaration
    bool active { get; }
    Property Value
    Type Description
    bool

    kernelSize

    Gets and sets the smooth kernel size.

    Declaration
    int kernelSize { get; set; }
    Property Value
    Type Description
    int

    Methods

    OnEnterToolMode()

    Defines data when the brush is selected.

    Declaration
    void OnEnterToolMode()

    OnExitToolMode()

    Defines data when the brush is deselected.

    Declaration
    void OnExitToolMode()

    OnInspectorGUI(Terrain, IOnInspectorGUI)

    Renders the brush's GUI within the inspector 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, float, float, float, Vector2)

    Triggers events when painting on a terrain.

    Declaration
    bool OnPaint(Terrain terrain, IOnPaint editContext, float brushSize, float brushRotation, float brushStrength, Vector2 uv)
    Parameters
    Type Name Description
    Terrain terrain

    The terrain in focus.

    IOnPaint editContext

    The editcontext to reference.

    float brushSize

    The brush's size.

    float brushRotation

    The brush's rotation.

    float brushStrength

    The brush's strength.

    Vector2 uv

    The brush's UV.

    Returns
    Type Description
    bool

    Returns true when the painting process is successful. Otherwise, returns false.

    OnSceneGUI(Terrain, IOnSceneGUI)

    Triggers events to render objects and displays within Scene view.

    Declaration
    void OnSceneGUI(Terrain terrain, IOnSceneGUI editContext)
    Parameters
    Type Name Description
    Terrain terrain

    The terrain in focus.

    IOnSceneGUI editContext

    The editcontext to reference.

    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)