Vixen
c7401864
csharp
public struct TerrainGrassComponent

What a scene says about a terrain's grass: which rule grows it, and how far.

Read the guide page for this →

Remarks

A second component rather than a field on TerrainComponent, because grass is optional and a reference-typed field on the terrain would make every bare mountain carry an empty string for a feature it does not use. The split also matches what the two describe: the terrain component is a placement, and this is a rule — [docs/plan/31 § D8] — nothing about a blade is in any file, and the whole field re-grows when the rule changes.

⚠ One grass type per terrain entity, which is this increment's honest ceiling. The ECS holds one component of a type per entity, and a fixed inline array of references is a scene format decision worth more thought than a rush. A level that wants two grasses on one terrain waits on that decision; a level with two terrains carries one of these on each.

Fields and properties (2)

  • public string Grass

    Which .vxgrass asset says what the grass is like.

  • public float Range

    How far from the camera cells are kept resident, in metres. Zero takes the default.

Methods (1)

Used by (9)

  • ArenaThirdPersonShooter
  • PbrShowcaseGamePbrShowcase
  • ComponentRegistrationVixen.Rendering.Terrain
  • TerrainExtractionSystemVixen.Rendering.Terrain
  • TerrainNodeTestsVixen.Rendering.Terrain.Tests
  • TypeRegistrationVixen.Rendering.Terrain
  • Vixen_Rendering_Terrain_TerrainGrassComponentSerializerVixen.Rendering.Terrain
  • ComponentTestsVixen.Editor.App.Tests
  • MaterialIconsVixen.Editor.App