Kiwi Grass Docs
View product

Reference

Runtime API

Integrate runtime quality, interaction, profiles, and renderer controls.

Kiwi Grass 26.8.0Unity 6000.0+URP

TerrainGrassRenderer

TerrainGrassRenderer is the supported runtime entry point. Its public properties expose the Terrain, configured layer roles, control map, species composition, profile references, quality level, persistent-bake state, readiness, pending work, and resolved statistics.

Use these methods for normal integration:

memberpurpose
TryValidateSetup(out string)validate required Terrain, layers, material, and settings
Regenerate()request one atomic complete-field regeneration
SetQualityLevel(TerrainGrassQualityLevel)switch High, Medium, Low, or Off without duplicating the blade allocation
TryGetStats(out TerrainGrassStats)read readiness, blade, chunk, command, memory, update, and allocation diagnostics
TryGetSpeciesStats(int, out TerrainGrassSpeciesStats)read one active species section
ValidateBakeAsset()validate assigned persistent metadata and payload against the current field
LoadBakeAsset()load a valid assigned bake into the runtime representation
RetryGpuUpload()retry a previously blocked upload after the underlying graphics issue is corrected

Call public methods from the main thread. Do not own or mutate the renderer’s internal NativeArrays, GraphicsBuffers, draw pool, or render-loop state.

Quality and profiles

TerrainGrassQualityLevel contains High, Medium, Low, and Off. TerrainGrassProfile, TerrainGrassWindProfile, and TerrainGrassQualityProfile are shared ScriptableObject authoring surfaces. Runtime quality is orthogonal to the selected quality profile.

Interaction

Add TerrainGrassStompSource to a moving object and configure collider contact or manual local bounds. TerrainGrassGlobalWind supplies an optional shared wind source; renderer-local multipliers preserve per-field control.

Artist Control

TerrainGrassControlMap exposes its texture, stable ID, revision counters, dimensions, readability, and shader-control presence. Saved painting should use the editor tools. Runtime TerrainLayer repainting should use Unity Terrain APIs; the renderer consumes the resulting Terrain callbacks.

TerrainGrassArtistControlVolume supplies transformable density, height, dryness, and wind-response overrides. Volume changes participate in renderer fingerprints and dirty-region updates.

Diagnostics contract

TerrainGrassStats and TerrainGrassSpeciesStats are snapshots, not retained ownership handles. A valid benchmark records the quality level, total and visible blades, chunks, commands, active GPU bytes, stage timing, and steady-state allocation together.

Low-level jobs, packed blade helpers, draw resources, shader IDs, and render-loop utilities are public for package assembly integration and tests but are not the stable gameplay-facing API for 1.0.

Still stuck?

Bring the renderer status with you.

Include the Kiwi Grass version, Unity and URP versions, operating system, graphics API, renderer status, Player log, and a minimal reproduction.

Email supportJoin Discord

Kiwi Grass 26.8.0

Search documentation