Class TintBrushSmooth
Advanced tint brush for interpolated tint color per-cell. Requires the use of custom shader (see TintedTilemap.shader) and helper component TileTextureGenerator.
Inherited Members
Namespace: UnityEditor.Tilemaps
Syntax
[CustomGridBrush(false, false, false, "Tint Brush (Smooth)")]
public class TintBrushSmooth : GridBrushBase
Fields
m_Blend
Factor to blend the Color of Tile with its color and this Brush's color
Declaration
public float m_Blend
Field Value
Type | Description |
---|---|
Single |
m_Color
Color of the Tile to tint
Declaration
public Color m_Color
Field Value
Type | Description |
---|---|
Color |
Methods
Erase(GridLayout, GameObject, Vector3Int)
Resets the color of the tiles in a given position within the selected layers to White. The TintBrushSmooth overrides this to set the color of the Grid position to White.
Declaration
public override void Erase(GridLayout grid, GameObject brushTarget, Vector3Int position)
Parameters
Type | Name | Description |
---|---|---|
GridLayout | grid | Grid used for layout. |
GameObject | brushTarget | Target of the erase operation. By default the currently selected GameObject. |
Vector3Int | position | The coordinates of the cell to erase data from. |
Overrides
Paint(GridLayout, GameObject, Vector3Int)
Tints tiles into a given position within the selected layers. The TintBrushSmooth overrides this to set the color of the Grid position to tint it.
Declaration
public override void Paint(GridLayout grid, GameObject brushTarget, Vector3Int position)
Parameters
Type | Name | Description |
---|---|---|
GridLayout | grid | Grid used for layout. |
GameObject | brushTarget | Target of the paint operation. By default the currently selected GameObject. |
Vector3Int | position | The coordinates of the cell to paint data to. |
Overrides
Pick(GridLayout, GameObject, BoundsInt, Vector3Int)
Picks the tint color given the coordinates of the cells. The TintBrushSmoot overrides this to provide color picking functionality.
Declaration
public override void Pick(GridLayout grid, GameObject brushTarget, BoundsInt position, Vector3Int pivot)
Parameters
Type | Name | Description |
---|---|---|
GridLayout | grid | Grid to pick data from. |
GameObject | brushTarget | Target of the picking operation. By default the currently selected GameObject. |
BoundsInt | position | The coordinates of the cells to paint data from. |
Vector3Int | pivot | Pivot of the picking brush. |