Class TintTextureGenerator
A helper class for tinting a Grid component
Inherited Members
Namespace: Global Namespace
Syntax
[ExecuteInEditMode]
public class TintTextureGenerator : MonoBehaviour
Fields
k_TintMapSize
Size of the Tint map in cells
Declaration
public int k_TintMapSize
Field Value
Type | Description |
---|---|
Int32 |
Methods
GetColor(Grid, Vector3Int)
Get the color of a position on a Grid
Declaration
public Color GetColor(Grid grid, Vector3Int position)
Parameters
Type | Name | Description |
---|---|---|
Grid | grid | Grid to get color from |
Vector3Int | position | Position of the Grid to get color from |
Returns
Type | Description |
---|---|
Color | Color of a position on a Grid |
Refresh(Grid)
Refreshes the tint color of the Grid
Declaration
public void Refresh(Grid grid)
Parameters
Type | Name | Description |
---|---|---|
Grid | grid | Grid to refresh color |
Refresh(Grid, Vector3Int)
Refreshes the color of a position on a Grid
Declaration
public void Refresh(Grid grid, Vector3Int position)
Parameters
Type | Name | Description |
---|---|---|
Grid | grid | Grid to refresh color |
Vector3Int | position | Position of the Grid to refresh color |
SetColor(Grid, Vector3Int, Color)
Set the color of a position on a Grid
Declaration
public void SetColor(Grid grid, Vector3Int position, Color color)
Parameters
Type | Name | Description |
---|---|---|
Grid | grid | Grid to set color to |
Vector3Int | position | Position of the Grid to set color to |
Color | color | Color to set to |
Start()
Callback when the TintTextureGenerator is loaded. Refreshes the Grid Component on this GameObject.
Declaration
public void Start()