Interface IHexTerrainAPI
Provides a comprehensive interface for interacting with hexagonal terrain systems, enabling access to terrain entities, layers, settings, and related UI and environment functionality.
Namespace: Fwt.HexTerrains
Assembly: fwt.hexterrains.dll
Syntax
public interface IHexTerrainAPI
Remarks
The IHexTerrainAPI interface exposes methods and properties for managing and querying various aspects of a hex terrain, including cell data, terrain layers, brush controls, visibility, and persistence. It supports advanced operations such as layer manipulation, raycasting, prefab configuration, and UI screen management. Implementations should ensure thread safety and proper initialization of terrain entities and layers before use. This interface is intended for use in applications that require dynamic and granular control over hex terrain features, such as editors or simulation tools.
Properties
EnvironmentAPI
Gets the API for accessing environment-related functionality.
Declaration
IEnvironmentAPI EnvironmentAPI { get; }
Property Value
| Type | Description |
|---|---|
| IEnvironmentAPI |
UISystemAPI
Gets the interface for interacting with the UI
Declaration
IUISystemAPI UISystemAPI { get; }
Property Value
| Type | Description |
|---|---|
| IUISystemAPI |
Methods
CreateNewTerrainEntity(Entity)
Creates a new terrain terrainEntity by instantiating provided prefab.
Declaration
Entity CreateNewTerrainEntity(Entity terrainPrefab)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | terrainPrefab | prefab of the terrainEntity to create |
Returns
| Type | Description |
|---|---|
| Entity | instance of the created terrainEntity |
CreateNewTerrain<TPrefabConfig>(TPrefabConfig, HexTerrainSettings)
Creates a new terrain entity with the specified settings. Destroys existing terrain
Declaration
Entity CreateNewTerrain<TPrefabConfig>(TPrefabConfig terrainPrefabConfig, HexTerrainSettings terrainSettings) where TPrefabConfig : IHexTerrainPrefabConfig
Parameters
| Type | Name | Description |
|---|---|---|
| TPrefabConfig | terrainPrefabConfig | prefab config of the terrainEntity to create |
| HexTerrainSettings | terrainSettings | terrain settings to overwrite |
Returns
| Type | Description |
|---|---|
| Entity | instance of the created terrainEntity |
Type Parameters
| Name | Description |
|---|---|
| TPrefabConfig |
CreateUIScreen<TScreen>()
Creates a new screen of the specified type.
Declaration
TScreen CreateUIScreen<TScreen>() where TScreen : UIScreen
Returns
| Type | Description |
|---|---|
| TScreen | screen instance |
Type Parameters
| Name | Description |
|---|---|
| TScreen | type of the screen to create |
DestroyTerrain(Entity)
Destroys a terrain entity provided.
Declaration
bool DestroyTerrain(Entity terrainEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | terrainEntity | terrain entity to destroy |
Returns
| Type | Description |
|---|---|
| bool | true if was destroyed, otherwise - false |
DestroyUIScreen(UIScreen)
Destroys the specified screen instance.
Declaration
bool DestroyUIScreen(UIScreen screen)
Parameters
| Type | Name | Description |
|---|---|---|
| UIScreen | screen | screen instance to destroy |
Returns
| Type | Description |
|---|---|
| bool | true if the screen was destroyed successfully; otherwise, false |
DestroyUIScreen<TScreen>()
Destroys the specified screen.
Declaration
bool DestroyUIScreen<TScreen>() where TScreen : UIScreen
Returns
| Type | Description |
|---|---|
| bool | true if the screen was destroyed successfully; otherwise, false |
Type Parameters
| Name | Description |
|---|---|
| TScreen | type of a screen to destroy |
GetBrushColor()
Returns the brush color from the TerrainEntity HexTerrainBrush.
Declaration
Color32? GetBrushColor()
Returns
| Type | Description |
|---|---|
| Color32? | brush color if found, otherwise - false |
GetBrushOpacity()
Returns the brush opacity from the TerrainEntity HexTerrainBrush.
Declaration
float? GetBrushOpacity()
Returns
| Type | Description |
|---|---|
| float? | brush opacity if brush is found, otherwise - null |
GetBrushSize()
Returns the brush size from the TerrainEntity HexTerrainBrush.
Declaration
int? GetBrushSize()
Returns
| Type | Description |
|---|---|
| int? | brush size if found, otherwise - null |
GetBrushView()
Returns the brush view from the TerrainEntity HexTerrainBrushView.
Declaration
HexTerrainBrushView GetBrushView()
Returns
| Type | Description |
|---|---|
| HexTerrainBrushView | brush view from the TerrainEntity if found, otherwise - null |
GetCellBiome<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the BiomeMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
int? GetCellBiome<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellBiome<TLayerGroup, TLayer>(int, int)
Returns the BiomeMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
int? GetCellBiome<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellBiome<TLayerGroup, TLayer>(int, int, string)
Returns the BiomeMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
int? GetCellBiome<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellBiome<TLayerGroup, TLayer>(int, string)
Returns the BiomeMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
int? GetCellBiome<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellCoordUnderCursor()
Returns the cell coordinate under the cursor.
Declaration
int2? GetCellCoordUnderCursor()
Returns
| Type | Description |
|---|---|
| int2? | cell coordinate if found and raycast hit the terrain, otherwise - false |
GetCellEntity<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the CellEntityMap value at the specified cell index from the specified CellEntityLayer.
Declaration
int? GetCellEntity<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellEntity<TLayerGroup, TLayer>(int, int)
Returns the CellEntityMap value at the specified cell index from the specified CellEntityLayer.
Declaration
int? GetCellEntity<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellEntity<TLayerGroup, TLayer>(int, int, string)
Returns the CellEntityMap value at the specified cell index from the specified CellEntityLayer.
Declaration
int? GetCellEntity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellEntity<TLayerGroup, TLayer>(int, string)
Returns the CellEntityMap value at the specified cell index from the specified CellEntityLayer.
Declaration
int? GetCellEntity<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellHeight<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the HeightMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
float? GetCellHeight<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellHeight<TLayerGroup, TLayer>(int, int)
Returns the HeightMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
float? GetCellHeight<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellHeight<TLayerGroup, TLayer>(int, int, string)
Returns the HeightMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
float? GetCellHeight<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellHeight<TLayerGroup, TLayer>(int, string)
Returns the HeightMap value at the specified cell index from the specified ChunkMeshLayer.
Declaration
float? GetCellHeight<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellIndexUnderCursor()
Returns the cell index under the cursor.
Declaration
int? GetCellIndexUnderCursor()
Returns
| Type | Description |
|---|---|
| int? | cell index if found and raycast hit the terrain, otherwise - false |
GetCellMineralIndex<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the MineralIndexMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
uint? GetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| uint? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellMineralIndex<TLayerGroup, TLayer>(int, int)
Returns the MineralIndexMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
uint? GetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| uint? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellMineralIndex<TLayerGroup, TLayer>(int, int, string)
Returns the MineralIndexMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
uint? GetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| uint? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellMineralIndex<TLayerGroup, TLayer>(int, string)
Returns the MineralIndexMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
uint? GetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| uint? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellObject<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the CellObjectMap value at the specified cell index from the specified CellObjectLayer.
Declaration
int? GetCellObject<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellObject<TLayerGroup, TLayer>(int, int)
Returns the CellObjectMap value at the specified cell index from the specified CellObjectLayer.
Declaration
int? GetCellObject<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellObject<TLayerGroup, TLayer>(int, int, string)
Returns the CellObjectMap value at the specified cell index from the specified CellObjectLayer.
Declaration
int? GetCellObject<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellObject<TLayerGroup, TLayer>(int, string)
Returns the CellObjectMap value at the specified cell index from the specified CellObjectLayer.
Declaration
int? GetCellObject<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellRegion<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the RegionMap value at the specified cell index from the specified CellRegionLayer.
Declaration
int? GetCellRegion<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellRegion<TLayerGroup, TLayer>(int, int)
Returns the RegionMap value at the specified cell index from the specified CellRegionLayer.
Declaration
int? GetCellRegion<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellRegion<TLayerGroup, TLayer>(int, int, string)
Returns the RegionMap value at the specified cell index from the specified CellRegionLayer.
Declaration
int? GetCellRegion<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to get a cell value from |
GetCellRegion<TLayerGroup, TLayer>(int, string)
Returns the RegionMap value at the specified cell index from the specified CellRegionLayer.
Declaration
int? GetCellRegion<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| int? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to get a cell value from |
GetChunkMeshLayerVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference)
Tells if the specified chunk mesh layer is visible.
Declaration
bool? GetChunkMeshLayerVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : VisualChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference | A reference to the terrain layer whose mesh layer visibility is to be determined. |
Returns
| Type | Description |
|---|---|
| bool? | A Boolean value indicating whether the mesh layer is visible; true if visible, false if not visible, or null if the visibility state cannot be determined. |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | The type of the terrain layer group containing the mesh layer. Must implement HexTerrainLayerGroup and IComponentData. |
| TLayer | The type of the chunk mesh layer to check for visibility. Must inherit from ChunkMeshLayer. |
GetGeoPlastAmount<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the GeoPlast AmountMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastAmount<TLayerGroup, TLayer>(int, int)
Returns the GeoPlast AmountMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastAmount<TLayerGroup, TLayer>(int, int, string)
Returns the GeoPlast AmountMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastAmount<TLayerGroup, TLayer>(int, string)
Returns the GeoPlast AmountMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastDensity<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the GeoPlast DensityMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastDensity<TLayerGroup, TLayer>(int, int)
Returns the GeoPlast DensityMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastDensity<TLayerGroup, TLayer>(int, int, string)
Returns the GeoPlast DensityMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastDensity<TLayerGroup, TLayer>(int, string)
Returns the GeoPlast DensityMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastHeat<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the GeoPlast HeatMap value at the specified cell index from the specified MaterialGeoPlastLayer.
Declaration
float? GetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastHeat<TLayerGroup, TLayer>(int, int)
Returns the GeoPlast HeatMap value at the specified cell index from the specified MaterialGeoPlastLayer.
Declaration
float? GetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastHeat<TLayerGroup, TLayer>(int, int, string)
Returns the GeoPlast HeatMap value at the specified cell index from the specified MaterialGeoPlastLayer.
Declaration
float? GetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastHeat<TLayerGroup, TLayer>(int, string)
Returns the GeoPlast HeatMap value at the specified cell index from the specified MaterialGeoPlastLayer.
Declaration
float? GetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastVolume<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the GeoPlast VolumeMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastVolume<TLayerGroup, TLayer>(int, int)
Returns the GeoPlast VolumeMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastVolume<TLayerGroup, TLayer>(int, int, string)
Returns the GeoPlast VolumeMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetGeoPlastVolume<TLayerGroup, TLayer>(int, string)
Returns the GeoPlast VolumeMap value at the specified cell index from the specified GeoPlastLayer.
Declaration
float? GetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to get a cell value from |
GetHexTerrainPrefabConfigsBuffer<THexTerrainPrefabConfig>()
Returns a list of available HexTerrainPrefabConfigs from the UserToolEntity (if any)
Declaration
DynamicBuffer<THexTerrainPrefabConfig> GetHexTerrainPrefabConfigsBuffer<THexTerrainPrefabConfig>() where THexTerrainPrefabConfig : unmanaged, IBufferElementData, IHexTerrainPrefabConfig
Returns
| Type | Description |
|---|---|
| DynamicBuffer<THexTerrainPrefabConfig> |
Type Parameters
| Name | Description |
|---|---|
| THexTerrainPrefabConfig | type of HexTerrainPrefabConfig you have |
GetHexTerrainPrefabConfigsList()
Returns a list of available HexTerrainPrefabConfigs from the UserToolEntity (if any). This list can be sent to the UI to display available terrain prefabs for the user to select from.
Declaration
IList<IHexTerrainPrefabConfig> GetHexTerrainPrefabConfigsList()
Returns
| Type | Description |
|---|---|
| IList<IHexTerrainPrefabConfig> | collection of hex terrain prefab configs for user to select from |
GetIsResizableBrush()
Returns true if the brush on TerrainEntity is resizable.
Declaration
bool GetIsResizableBrush()
Returns
| Type | Description |
|---|---|
| bool | is brush found and resizable |
GetIsTerrainVisible()
Returns true if terrain is visible, false is invisible, null if no terrain with visibility foundHexTerrainVisibility.
Declaration
bool? GetIsTerrainVisible()
Returns
| Type | Description |
|---|---|
| bool? | true if terrain is visible, false is invisible, null if no terrain with visibility found |
GetIsVisibleBrush()
Returns true if the brush on TerrainEntity is visible.
Declaration
bool GetIsVisibleBrush()
Returns
| Type | Description |
|---|---|
| bool | true if brush is found and is visible, otherwise - false |
GetMineralsAmount<TLayerGroup, TLayer>(int, HexTerrainLayerReference)
Returns the AmountMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
float? GetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| HexTerrainLayerReference | layerReference | reference to the layer to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetMineralsAmount<TLayerGroup, TLayer>(int, int)
Returns the AmountMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
float? GetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetMineralsAmount<TLayerGroup, TLayer>(int, int, string)
Returns the AmountMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
float? GetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to get a cell value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetMineralsAmount<TLayerGroup, TLayer>(int, string)
Returns the AmountMap value at the specified cell index from the specified CellMineralsLayer.
Declaration
float? GetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, string layerName) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to get a value from |
| string | layerName | name of the layer in HexTerrainLayerGroup to get a cell value from |
Returns
| Type | Description |
|---|---|
| float? | value if found or null if not found |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to get a cell value from |
GetOrCreateUIScreen<TScreen>()
Gets an existing screen of the specified type, or creates a new one if it doesn't exist.
Declaration
TScreen GetOrCreateUIScreen<TScreen>() where TScreen : UIScreen
Returns
| Type | Description |
|---|---|
| TScreen | screen instance |
Type Parameters
| Name | Description |
|---|---|
| TScreen | type of the screen to get or create |
GetRaycastData()
Returns the Raycast data from the TerrainEntity HexTerrainRaycastData. this data contains information about the raycast from mouse to terrain result.
Declaration
HexTerrainRaycastData? GetRaycastData()
Returns
| Type | Description |
|---|---|
| HexTerrainRaycastData? | raycast data from the TerrainEntity |
GetTerrainEntity()
Get the TerainEntity this API is working with.
Declaration
Entity GetTerrainEntity()
Returns
| Type | Description |
|---|---|
| Entity | terrain terrainEntity this API works with |
GetTerrainLayer<TTerrainLayer>()
returns a terrain layer from the TerrainEntity GetTerrainEntity()
Declaration
TTerrainLayer GetTerrainLayer<TTerrainLayer>() where TTerrainLayer : class
Returns
| Type | Description |
|---|---|
| TTerrainLayer | data layer if found, otherwise - null |
Type Parameters
| Name | Description |
|---|---|
| TTerrainLayer |
GetTerrainLayer<TTerrainLayerGroup, TTerrainLayer>(HexTerrainLayerReference)
Returns a terrain layer of type TTerrainLayer from the terrain layer group TTerrainLayerGroup from the Terrain Entity
Declaration
TTerrainLayer GetTerrainLayer<TTerrainLayerGroup, TTerrainLayer>(HexTerrainLayerReference layerReference) where TTerrainLayerGroup : HexTerrainLayerGroup where TTerrainLayer : HexTerrainLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference | reference data to needed layer |
Returns
| Type | Description |
|---|---|
| TTerrainLayer | terrain layer if found and null otherwise |
Type Parameters
| Name | Description |
|---|---|
| TTerrainLayerGroup | Type of the Terrain Layer Group to find on the entity |
| TTerrainLayer | Type of the Terrain layer to get from a layer group |
GetTerrainSettings()
Returns a Terrain Settings if found.
Declaration
HexTerrainSettings? GetTerrainSettings()
Returns
| Type | Description |
|---|---|
| HexTerrainSettings? | terrain settings if found or null if not found |
GetUIScreen<TScreen>()
Gets an existing screen of the specified type if found.
Declaration
TScreen GetUIScreen<TScreen>() where TScreen : UIScreen
Returns
| Type | Description |
|---|---|
| TScreen |
Type Parameters
| Name | Description |
|---|---|
| TScreen | type of the screen to get |
GetViewMode()
Returns the view mode of the TerrainEntity HexTerrainViewMode.
Declaration
int GetViewMode()
Returns
| Type | Description |
|---|---|
| int | view mode if found, otherwise - false |
HideChunkMeshLayer<TLayerGroup, TLayer>(HexTerrainLayerReference)
Hides the specified chunk mesh layer within the given terrain layer group.
Declaration
bool HideChunkMeshLayer<TLayerGroup, TLayer>(HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : VisualChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference | A reference to the terrain layer to be hidden. Cannot be null. |
Returns
| Type | Description |
|---|---|
| bool | true if the chunk mesh layer was successfully hidden; otherwise, false. |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | The type of the terrain layer group containing the chunk mesh layer. Must implement HexTerrainLayerGroup and IComponentData. |
| TLayer | The type of the chunk mesh layer to hide. Must inherit from ChunkMeshLayer. |
IsLayerSupported<TDataLayer>()
Checks if the data layer is supported by the terrain. Usually means if terrain has this data layer.
Declaration
bool IsLayerSupported<TDataLayer>() where TDataLayer : class
Returns
| Type | Description |
|---|---|
| bool | true if supports, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TDataLayer | type of the TerrainLayer to check |
LoadTerrain(string)
Loads the TerrainEntity from a file.
Declaration
bool LoadTerrain(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | file path to load a terrain from |
Returns
| Type | Description |
|---|---|
| bool | true if loaded, otherwise - false |
ResizeTerrain(int2)
Resizes the TerrainEntity TerrainSize.
Declaration
bool ResizeTerrain(int2 terrainSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int2 | terrainSize | new terrain size |
Returns
| Type | Description |
|---|---|
| bool | true if was resized, otherwise - false |
SaveTerrain(string)
Saves the TerrainEntity to a file.
Declaration
bool SaveTerrain(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | file path to save a terrain into |
Returns
| Type | Description |
|---|---|
| bool | true if terrain has been saved, otherwise - false |
SetBrushColor(Color32)
Sets the brush color on the TerrainEntity HexTerrainBrush.
Declaration
bool SetBrushColor(Color32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color32 | color | new brush color |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetBrushOpacity(float)
Sets the brush opacity on the TerrainEntity HexTerrainBrush.
Declaration
bool SetBrushOpacity(float opacity)
Parameters
| Type | Name | Description |
|---|---|---|
| float | opacity | new opacity value (0..1) |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetBrushSize(int)
Sets the brush size on the TerrainEntity HexTerrainBrush.
Declaration
bool SetBrushSize(int brushSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | brushSize | new brush size |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetCellBiome<TLayerGroup, TLayer>(int, HexTerrainLayerReference, int)
Sets the BiomeMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellBiome<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellBiome<TLayerGroup, TLayer>(int, int, int)
Sets the BiomeMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellBiome<TLayerGroup, TLayer>(int cellIndex, int layerIndex, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellBiome<TLayerGroup, TLayer>(int, int, string, int)
Sets the BiomeMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellBiome<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellBiome<TLayerGroup, TLayer>(int, string, int)
Sets the BiomeMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellBiome<TLayerGroup, TLayer>(int cellIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellEntity<TLayerGroup, TLayer>(int, HexTerrainLayerReference, int)
Sets the CellEntityMap value at the specified cell index at the specified CellEntityLayer.
Declaration
bool SetCellEntity<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellEntity<TLayerGroup, TLayer>(int, int, int)
Sets the CellEntityMap value at the specified cell index at the specified CellEntityLayer.
Declaration
bool SetCellEntity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellEntity<TLayerGroup, TLayer>(int, int, string, int)
Sets the CellEntityMap value at the specified cell index at the specified CellEntityLayer.
Declaration
bool SetCellEntity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellEntity<TLayerGroup, TLayer>(int, string, int)
Sets the CellEntityMap value at the specified cell index at the specified CellEntityLayer.
Declaration
bool SetCellEntity<TLayerGroup, TLayer>(int cellIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellEntityLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellEntityLayer from |
| TLayer | type of CellEntityLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellHeight<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the HeightMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellHeight<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellHeight<TLayerGroup, TLayer>(int, int, float)
Sets the HeightMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellHeight<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellHeight<TLayerGroup, TLayer>(int, int, string, float)
Sets the HeightMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellHeight<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellHeight<TLayerGroup, TLayer>(int, string, float)
Sets the HeightMap value at the specified cell index at the specified ChunkMeshLayer.
Declaration
bool SetCellHeight<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : ChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the ChunkMeshLayer from |
| TLayer | type of ChunkMeshLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellMineralIndex<TLayerGroup, TLayer>(int, HexTerrainLayerReference, uint)
Sets the MineralIndexMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, uint value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| uint | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellMineralIndex<TLayerGroup, TLayer>(int, int, string, uint)
Sets the MineralIndexMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, uint value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| uint | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellMineralIndex<TLayerGroup, TLayer>(int, int, uint)
Sets the MineralIndexMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, int layerIndex, uint value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| uint | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellMineralIndex<TLayerGroup, TLayer>(int, string, uint)
Sets the MineralIndexMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetCellMineralIndex<TLayerGroup, TLayer>(int cellIndex, string layerName, uint value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| uint | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellObject<TLayerGroup, TLayer>(int, HexTerrainLayerReference, int)
Sets the CellObjectMap value at the specified cell index at the specified CellObjectLayer.
Declaration
bool SetCellObject<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellObject<TLayerGroup, TLayer>(int, int, int)
Sets the CellObjectMap value at the specified cell index at the specified CellObjectLayer.
Declaration
bool SetCellObject<TLayerGroup, TLayer>(int cellIndex, int layerIndex, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellObject<TLayerGroup, TLayer>(int, int, string, int)
Sets the CellObjectMap value at the specified cell index at the specified CellObjectLayer.
Declaration
bool SetCellObject<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellObject<TLayerGroup, TLayer>(int, string, int)
Sets the CellObjectMap value at the specified cell index at the specified CellObjectLayer.
Declaration
bool SetCellObject<TLayerGroup, TLayer>(int cellIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellObjectLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellObjectLayer from |
| TLayer | type of CellObjectLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellRegion<TLayerGroup, TLayer>(int, HexTerrainLayerReference, int)
Sets the RegionMap value at the specified cell index at the specified CellRegionLayer.
Declaration
bool SetCellRegion<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellRegion<TLayerGroup, TLayer>(int, int, int)
Sets the RegionMap value at the specified cell index at the specified CellRegionLayer.
Declaration
bool SetCellRegion<TLayerGroup, TLayer>(int cellIndex, int layerIndex, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellRegion<TLayerGroup, TLayer>(int, int, string, int)
Sets the RegionMap value at the specified cell index at the specified CellRegionLayer.
Declaration
bool SetCellRegion<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to set a cell value at |
SetCellRegion<TLayerGroup, TLayer>(int, string, int)
Sets the RegionMap value at the specified cell index at the specified CellRegionLayer.
Declaration
bool SetCellRegion<TLayerGroup, TLayer>(int cellIndex, string layerName, int value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellRegionLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| int | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellRegionLayer from |
| TLayer | type of CellRegionLayer from the HexTerrainLayerGroup to set a cell value at |
SetChunkMeshVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference, bool)
Sets the visibility of the specified chunk mesh layer within the given terrain layer reference.
Declaration
bool SetChunkMeshVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference layerReference, bool isVisible) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : VisualChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference | A reference to the terrain layer containing the chunk mesh layer whose visibility is to be changed. |
| bool | isVisible | A value indicating whether the chunk mesh layer should be visible. Set to true to show the layer; false to hide it. |
Returns
| Type | Description |
|---|---|
| bool | true if the visibility of the chunk mesh layer was changed successfully; otherwise, false. |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | The type of the terrain layer group. Must inherit from HexTerrainLayerGroup and implement IComponentData. |
| TLayer | The type of the visual chunk mesh layer to show or hide. Must inherit from VisualChunkMeshLayer. |
SetGeoPlastAmount<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the GeoPlast AmountMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastAmount<TLayerGroup, TLayer>(int, int, float)
Sets the GeoPlast AmountMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastAmount<TLayerGroup, TLayer>(int, int, string, float)
Sets the GeoPlast AmountMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastAmount<TLayerGroup, TLayer>(int, string, float)
Sets the GeoPlast AmountMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastAmount<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastDensity<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the GeoPlast DensityMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastDensity<TLayerGroup, TLayer>(int, int, float)
Sets the GeoPlast DensityMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastDensity<TLayerGroup, TLayer>(int, int, string, float)
Sets the GeoPlast DensityMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastDensity<TLayerGroup, TLayer>(int, string, float)
Sets the GeoPlast DensityMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastDensity<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastHeat<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the GeoPlast HeatMap value at the specified cell index at the specified MaterialGeoPlastLayer.
Declaration
bool SetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastHeat<TLayerGroup, TLayer>(int, int, float)
Sets the GeoPlast HeatMap value at the specified cell index at the specified MaterialGeoPlastLayer.
Declaration
bool SetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastHeat<TLayerGroup, TLayer>(int, int, string, float)
Sets the GeoPlast HeatMap value at the specified cell index at the specified MaterialGeoPlastLayer.
Declaration
bool SetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastHeat<TLayerGroup, TLayer>(int, string, float)
Sets the GeoPlast HeatMap value at the specified cell index at the specified MaterialGeoPlastLayer.
Declaration
bool SetGeoPlastHeat<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : MaterialGeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the MaterialGeoPlastLayer from |
| TLayer | type of MaterialGeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastVolume<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the GeoPlast VolumeMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastVolume<TLayerGroup, TLayer>(int, int, float)
Sets the GeoPlast VolumeMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastVolume<TLayerGroup, TLayer>(int, int, string, float)
Sets the GeoPlast VolumeMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetGeoPlastVolume<TLayerGroup, TLayer>(int, string, float)
Sets the GeoPlast VolumeMap value at the specified cell index at the specified GeoPlastLayer.
Declaration
bool SetGeoPlastVolume<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : GeoPlastLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the GeoPlastLayer from |
| TLayer | type of GeoPlastLayer from the HexTerrainLayerGroup to set a cell value at |
SetIsResizableBrush(bool)
Sets the IsResizable value of the brush on TerrainEntity HexTerrainBrush.
Declaration
bool SetIsResizableBrush(bool isResizableBrush)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isResizableBrush | new value for IsResizable |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetIsTerrainVisible(bool)
Sets terrain visibility. HexTerrainVisibility Returns true if value was set
Declaration
bool SetIsTerrainVisible(bool isVisible)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isVisible | New visibility value for terrain |
Returns
| Type | Description |
|---|---|
| bool | True if value was set, otherwise - false |
SetIsVisibleBrush(bool)
Sets the IsVisible value of the brush on TerrainEntity HexTerrainBrush.
Declaration
bool SetIsVisibleBrush(bool isVisibleBrush)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isVisibleBrush | new IsVisible value |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetMineralsAmount<TLayerGroup, TLayer>(int, HexTerrainLayerReference, float)
Sets the AmountMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, HexTerrainLayerReference layerReference, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| HexTerrainLayerReference | layerReference | reference to the layer to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetMineralsAmount<TLayerGroup, TLayer>(int, int, float)
Sets the AmountMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetMineralsAmount<TLayerGroup, TLayer>(int, int, string, float)
Sets the AmountMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, int layerIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| int | layerIndex | index of the layer in HexTerrainLayerGroup to set a cell value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetMineralsAmount<TLayerGroup, TLayer>(int, string, float)
Sets the AmountMap value at the specified cell index at the specified CellMineralsLayer.
Declaration
bool SetMineralsAmount<TLayerGroup, TLayer>(int cellIndex, string layerName, float value) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : CellMineralsLayer
Parameters
| Type | Name | Description |
|---|---|---|
| int | cellIndex | cell index to set a value at |
| string | layerName | name of the layer in HexTerrainLayerGroup to set a cell value at |
| float | value | value to set |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | type of HexTerrainLayerGroup entity component to get the CellMineralsLayer from |
| TLayer | type of CellMineralsLayer from the HexTerrainLayerGroup to set a cell value at |
SetViewMode(SetViewModeRequest)
Sets the view mode based on the parameters specified in the request.
Declaration
bool SetViewMode(SetViewModeRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| SetViewModeRequest | request | An object that specifies the view mode to set, either by index or by name. The request must indicate which method to use. |
Returns
| Type | Description |
|---|---|
| bool | true if the view mode is successfully set; otherwise, false. |
Remarks
If neither the view mode index nor the view mode name is specified in the request, the method returns false.
SetViewMode(int)
Sets the view mode on the TerrainEntity HexTerrainViewMode.
Declaration
bool SetViewMode(int viewMode)
Parameters
| Type | Name | Description |
|---|---|---|
| int | viewMode | new view mode |
Returns
| Type | Description |
|---|---|
| bool | true if value has been set, otherwise - false |
SetViewMode(string)
Sets the current view mode to the specified mode name.
Declaration
bool SetViewMode(string viewModeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewModeName | The name of the view mode to set. This value must correspond to the name of the view mode in a list of available view modes in a ViewMode config attached to terrain entity ViewModeConfigsComponent. |
Returns
| Type | Description |
|---|---|
| bool | true if the view mode was successfully set; otherwise, false. |
Remarks
If an invalid or unsupported view mode name is provided, the method returns false and the view mode remains unchanged.
ShowChunkMeshLayer<TLayerGroup, TLayer>(HexTerrainLayerReference)
Declaration
bool ShowChunkMeshLayer<TLayerGroup, TLayer>(HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : VisualChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference |
Returns
| Type | Description |
|---|---|
| bool |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | |
| TLayer |
ToggleChunkMeshLayerVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference)
Toggles the visibility of a chunk mesh layer associated with the specified terrain layer reference.
Declaration
bool ToggleChunkMeshLayerVisibility<TLayerGroup, TLayer>(HexTerrainLayerReference layerReference) where TLayerGroup : HexTerrainLayerGroup, IComponentData where TLayer : VisualChunkMeshLayer
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainLayerReference | layerReference | A reference to the terrain layer whose chunk mesh layer visibility will be toggled. |
Returns
| Type | Description |
|---|---|
| bool | true if the chunk mesh layer is now visible; otherwise, false. |
Type Parameters
| Name | Description |
|---|---|
| TLayerGroup | The type of the terrain layer group. Must inherit from HexTerrainLayerGroup and implement IComponentData. |
| TLayer | The type of the chunk mesh layer to toggle. Must inherit from ChunkMeshLayer. |
ToggleIsTerrainVisible()
Toggles the visibility of the terrain on the TerrainEntity HexTerrainVisibility.
Declaration
bool? ToggleIsTerrainVisible()
Returns
| Type | Description |
|---|---|
| bool? | True if terrain now visible, false is invisible, null if no terrain with visibility found |