Class CellMetricsDataLayer
Data layer for storing cell metrics per cell HexCellMetrics.
Inheritance
CellMetricsDataLayer
Inherited Members
Namespace: Fwt.HexTerrains.DataLayers
Assembly: fwt.hexterrains.dll
Syntax
public class CellMetricsDataLayer : HexTerrainNativeListChunkedDataLayer<HexCellMetrics>, IDisposable, ICommitChanges, IListDataLayer<HexCellMetrics>
Fields
CellPositions
Cached positions of the cells relative to the terrain origin. Meant to be used for calculating transforms of the cell items
Declaration
public NativeList<float3> CellPositions
Field Value
| Type | Description |
|---|---|
| NativeList<float3> |
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
Cleanup()
Declaration
public override void Cleanup()
Overrides
CleanupAsync()
Declaration
public override JobHandle CleanupAsync()
Returns
| Type | Description |
|---|---|
| JobHandle |
Overrides
Dispose()
Disposes the data layer, calls DisposeAllItems() DisposeAllItems()
Declaration
public override void Dispose()
Overrides
Init(int, HexTerrainSettings)
Initializes/Reinitializes the data layer. Use this method instead of base.Init() to initialize the data layer, as this one correctly initializes the chunks grid
Declaration
public override void Init(int layerSize, HexTerrainSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| int | layerSize | Cells count in the terrain |
| HexTerrainSettings | settings | hex settings of the terrain |