Class GridBrushPickStore
A ScriptableObject that stores picks for a particular GridBrushBase type. The picks include a list of picks defined by the user and a limited list of picks which were last made by the user. The picks can be loaded onto the active Brush in the TilePalette.
Inherited Members
Namespace: UnityEditor .Tilemaps
Assembly: Unity.2D.Tilemap.Editor.dll
Syntax
public class GridBrushPickStore : ScriptableObject
Properties
filteredUserSavedBrushes
A list of GridBrushBases which represent the user picks made filtered by the current filter type.
Declaration
public List<GridBrushBase> filteredUserSavedBrushes { get; }
Property Value
Type | Description |
---|---|
List<Grid |
lastIndex
The index of the latest last pick that was made.
Declaration
public int lastIndex { get; }
Property Value
Type | Description |
---|---|
int |
lastSavedBrushes
A list of GridBrushBases which represent the last picks made.
Declaration
public List<GridBrushBase> lastSavedBrushes { get; }
Property Value
Type | Description |
---|---|
List<Grid |
userSavedBrushes
A list of GridBrushBases which represent the user picks made.
Declaration
public List<GridBrushBase> userSavedBrushes { get; }
Property Value
Type | Description |
---|---|
List<Grid |
Methods
AddNewLastSavedBrush(GridBrushBase)
Adds the specified Brush as a new last pick.
Declaration
public void AddNewLastSavedBrush(GridBrushBase brush)
Parameters
Type | Name | Description |
---|---|---|
Grid |
brush | Brush to save as a new last pick. |
AddNewUserSavedBrush(GridBrushBase)
Adds the specified Brush as a new user pick.
Declaration
public void AddNewUserSavedBrush(GridBrushBase brush)
Parameters
Type | Name | Description |
---|---|---|
Grid |
brush | Brush to save as a new user pick. |
ClearLastSavedBrush(int)
Clears the Brush at the index of the last pick list.
Declaration
public void ClearLastSavedBrush(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the Brush of the last pick list to clear. |
RemoveUserSavedBrush(int)
Removes the Brush at the index of the last pick list.
Declaration
public bool RemoveUserSavedBrush(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the Brush of the user pick list to remove. |
Returns
Type | Description |
---|---|
bool | Whether the Brush was removed. |
SaveUserSavedBrush(int, GridBrushBase)
Saves over a brush in the user pick with the given index with the specified Brush.
Declaration
public void SaveUserSavedBrush(int index, GridBrushBase brush)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the Brush of the user pick list to save over. |
Grid |
brush | Brush to save over as a user pick. |
SetUserBrushFilterType(Type, string)
Sets the type to filter all user brushes by.
Declaration
public void SetUserBrushFilterType(Type filterType, string filterText)
Parameters
Type | Name | Description |
---|---|---|
Type | filterType | Type to filter user brushes. |
string | filterText | Text to filter user brush names. |
SwapUserSavedBrushes(int, int)
Swaps the position of the specified Brush
Declaration
public void SwapUserSavedBrushes(int oldIdx, int newIdx)