Class RainChunkMeshLayer
Represents a mesh layer responsible for generating rain effects on a visual chunk within the terrain rendering system.
Inherited Members
Namespace: Fwt.HexTerrains.ChunkMehes.Data
Assembly: fwt.hexterrains.dll
Syntax
public class RainChunkMeshLayer : VisualChunkMeshLayer, IDisposable, ISerializableTerrainLayer
Remarks
This class customizes mesh generation to add rain-specific geometry and visual effects to terrain chunks. It is typically used in conjunction with other mesh layers to compose the final rendered appearance of a terrain chunk. The rain height and rendering settings can be adjusted to control the appearance of the rain effect.
Fields
RainRenderSettings
Declaration
public RainRenderSettings RainRenderSettings
Field Value
| Type | Description |
|---|---|
| RainRenderSettings |
Methods
Init<TInitArgs>(HexTerrainSettings, TInitArgs)
Initializes the mesh layer with the specified terrain settings and mesh layer configuration.
Declaration
public override void Init<TInitArgs>(HexTerrainSettings settings, TInitArgs initArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| HexTerrainSettings | settings | The terrain settings to use for initialization. Provides configuration values such as grid size, elevation, and other terrain-related parameters. |
| TInitArgs | initArgs |
Type Parameters
| Name | Description |
|---|---|
| TInitArgs |
Overrides
Remarks
If args is a IVisualChunkMeshLayerConfig, this
method copies its render settings, visibility, render configurations, and biome UV configurations to the
mesh layer. Existing render configurations are cleared and replaced. The method also ensures that biome UV
configuration storage is properly initialized and holds the new values from the provided args.
ScheduleGenerateMeshJob(ChunkMetricsDataLayer, ChunkMeshSourcesDataLayer, CellMetricsDataLayer, int, JobHandle)
Schedules a job to generate a mesh for the chunk with a given index. If you want to introduce your own mesh generator, override this method and schedule your own job.
Declaration
public override JobHandle ScheduleGenerateMeshJob(ChunkMetricsDataLayer chunkMetrics, ChunkMeshSourcesDataLayer chunkMeshSources, CellMetricsDataLayer cellMetrics, int chunkIndex, JobHandle dependency)
Parameters
| Type | Name | Description |
|---|---|---|
| ChunkMetricsDataLayer | chunkMetrics | Metrix of all terrain chunks |
| ChunkMeshSourcesDataLayer | chunkMeshSources | MeshSources to save generated mesh data into |
| CellMetricsDataLayer | cellMetrics | Metrics of all cells |
| int | chunkIndex | Index of chunk to schedule a mesh generation for |
| JobHandle | dependency | JobHandle to use as parameter when scheduling job |
Returns
| Type | Description |
|---|---|
| JobHandle |