Class CellColorsDataLayer
Data layer for storing a Color per cell
Inheritance
NativeListChunkedDataLayer<Color32>
HexTerrainNativeListChunkedDataLayer<Color32>
CellColorsDataLayer
Inherited Members
Namespace: Fwt.HexTerrains.DataLayers
Assembly: fwt.hexterrains.dll
Syntax
public class CellColorsDataLayer : HexTerrainNativeListChunkedDataLayer<Color32>, IDisposable, ICommitChanges, IListDataLayer<Color32>
Fields
HasMipMap
Used to reinitialize the texture when ApplyColorsToTexture is called and the texture is not the same size as the layer
Declaration
public bool HasMipMap
Field Value
| Type | Description |
|---|---|
| bool |
TextureFormat
Used to reinitialize the texture when ApplyColorsToTexture is called and the texture is not the same size as the layer
Declaration
public TextureFormat TextureFormat
Field Value
| Type | Description |
|---|---|
| TextureFormat |
_cellColors
Used to fill a texture with stored colors
Declaration
protected Color32[] _cellColors
Field Value
| Type | Description |
|---|---|
| Color32[] |
Properties
IsDisposableItems
If true, means when layer is resized or disposed, all items that are removed will be disposed (see nested classes description for details as the process may be different from layer to layer)
Declaration
public override bool IsDisposableItems { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
ApplyColorsToTexture(Texture2D)
Fills a provided texture with the colors stored in this data layer. if the texture is not the same size as the terrain, it will be reinitialized.
Declaration
public virtual void ApplyColorsToTexture(Texture2D texture)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture2D | texture | texture to fill with colors from this data layer |
Cleanup()
Declaration
public override void Cleanup()
Overrides
CleanupAsync()
Declaration
public override JobHandle CleanupAsync()
Returns
| Type | Description |
|---|---|
| JobHandle |