Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


OnRenderBrushPreview(Terrain, IOnSceneGUI)

Use this method to implement custom tool preview and UI behavior that will only render while the mouse is within the SceneView bounds or while you're actively using this tool.
Read time 1 minuteLast updated 12 days ago

Definition

public virtual void OnRenderBrushPreview(Terrain terrain, IOnSceneGUI editContext)

Parameters

terrain

Active Terrain object.

editContext

Interface for communication between Editor and Paint tools.

Remarks

Unity calls this method when the mouse is within the SceneView viewport bounds, and the hotControl is set to 0 or to the Terrain control ID provided by the IOnSceneGUI context instance. This is usually when no other tools are active, or when you're actively using this tool.