Class GridPaintingState
GridPaintingState controls the state of objects for painting with a Tile Palette.
Inherited Members
Namespace: UnityEditor.Tilemaps
Assembly: Unity.2D.Tilemap.Editor.dll
Syntax
public class GridPaintingState : ScriptableSingleton<GridPaintingState>
Remarks
Utilize this class to get and set the current painting target and brush for painting with the Tile Palette.
Properties
| Name | Description |
|---|---|
| activeBrushEditor | The currently active editor for the active brush for the Tile Palette |
| brushes | Returns all available brushes for the Tile Palette |
| gridBrush | The currently active brush for the Tile Palette |
| palette | The currently active palette GameObject for the Tile Palette |
| palettes | Returns all available Palette GameObjects for the Tile Palette |
| scenePaintTarget | The currently active target for the Tile Palette |
| validTargets | A list of all valid targets that can be set as an active target for the Tile Palette |
Methods
| Name | Description |
|---|---|
| IsPartOfActivePalette(GameObject) | Checks if target GameObject is part of the active Palette. |
Events
| Name | Description |
|---|---|
| brushChanged | Callback when the Tile Palette's active brush has changed. |
| paletteChanged | Callback when the Tile Palette's active palette GameObject has changed. |
| scenePaintTargetChanged | Callback when the Tile Palette's active target has changed |