> For the complete documentation index, see [llms.txt](https://flora.magneticarcade.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flora.magneticarcade.com/scripts/scene-settings.md).

# Scene Settings

The **Scene Settings** component is a scene-wide singleton for Flora behavior.

Create or select it from **GameObject > Flora > Scene Settings**. If a Scene Settings object already exists, the menu item selects the existing object instead of creating a duplicate.

## What This Affects

* Scene render enable/disable
* Terrain foliage integration and auto-registration
* Scene-level occlusion, motion vectors, light probes, density gating
* Terrain detail streaming controls
* Live culling and graphics-buffer stats in the inspector

***

## Inspector

The Scene Settings inspector has two tabs:

* **Global** - scene feature flags, terrain foliage controls, and terrain detail streaming controls.
* **Stats** - live CPU culling, GPU culling, and graphics-buffer tables.

The status chips show whether Flora rendering and terrain foliage are active. Warning rows appear when project-level Runtime Settings prevent a scene feature from taking effect, such as globally disabled GPU occlusion, per-object motion vectors, or legacy light probes.

The action buttons open common tools:

* **Rendering Inspector** - opens [Rendering Inspector](/rendering/rendering-inspector.md).
* **Rendering Debugger** - opens [Debugging](/rendering/debugging.md).
* **Flora Graphics Settings** - opens Project Settings > Graphics for project-wide Runtime Settings.
* **Add Render Settings Volume** - adds a global Volume with `FloraRenderSettings` and `FloraDensitySettings` when the Scene Settings object does not already have a Volume.

The **Stats** tab enables culling-stat collection while it is visible and rendering is enabled. It refreshes periodically and shows CPU culling views, GPU culling views, and Flora graphics-buffer allocation data.

***

### Properties

#### <mark style="color:yellow;">OverrideCullingPipeline</mark> *(Obsolete)*

* Kept for migration compatibility.
* Has no effect in current Flora.

#### <mark style="color:yellow;">CullingPipelineOverride</mark> *(Obsolete)*

* Kept for migration compatibility.
* Has no effect in current Flora.

***

#### <mark style="color:yellow;">EnableRendering</mark>

* Master scene toggle for Flora rendering.

#### <mark style="color:yellow;">EnableTerrainFoliage</mark>

* Enables Flora rendering for terrain trees/details.

#### <mark style="color:yellow;">AutoRegisterTerrains</mark>

* Automatically registers active terrains using `FloraTerrainProvider`.

***

#### <mark style="color:yellow;">AllowGPUOcclusionCulling</mark>

* Scene-level gate for GPU occlusion.

#### <mark style="color:yellow;">AllowPerObjectMotionVectors</mark>

* Scene-level gate for per-object motion vectors.

#### <mark style="color:yellow;">AllowPerTreeMotionVectors</mark>

* Tree motion vectors; requires `AllowPerObjectMotionVectors`.

#### <mark style="color:yellow;">AllowPerDetailMotionVectors</mark>

* Detail motion vectors; requires `AllowPerObjectMotionVectors`.

#### <mark style="color:yellow;">AllowPerTreeLightProbes</mark>

* Enables per-tree probe sampling.

#### <mark style="color:yellow;">AllowPerDetailLightProbes</mark>

* Enables per-detail probe sampling.

#### <mark style="color:yellow;">AllowDensityCulling</mark>

* Enables density systems in this scene.

#### <mark style="color:yellow;">AllowLegacyLightProbes</mark>

* Enables legacy baked light-probe usage for scene content.

***

#### <mark style="color:yellow;">DetailStreamingMode</mark>

* Controls the overall terrain detail streaming behavior.
* `Immediate` spends as much work as needed to make visible details appear quickly.
* `Streamed` is the default mode and uses the responsiveness slider to control how aggressively Flora spends its per-frame streaming budget.
* `Custom` exposes Flora's internal per-frame rebuild and structural budgets directly for advanced tuning.

#### <mark style="color:yellow;">DetailStreamingResponsiveness</mark>

* Controls how aggressively Flora spends its streaming budget.
* Higher values make visible details catch up faster.
* Lower values spread work across more frames to reduce spikes.
* Ignored when `DetailStreamingMode` is `Immediate` or `Custom`.

#### <mark style="color:yellow;">CustomDetailPatchLayerBudgetPerFrame</mark>

* Advanced-only control used when `DetailStreamingMode` is `Custom`.
* Limits how many detail patch-layer rebuilds Flora may schedule per frame.
* `0` means unbounded.

#### <mark style="color:yellow;">CustomDetailStructuralInstanceBudgetPerFrame</mark>

* Advanced-only control used when `DetailStreamingMode` is `Custom`.
* Limits how many detail create/destroy instance operations Flora may apply per frame.
* `0` means unbounded.

#### <mark style="color:yellow;">DetailUnloadHysteresisSeconds</mark>

* Acts as an unload grace period.
* Flora keeps terrain details alive for this many seconds after they leave range before unloading them.
* Increasing it reduces rapid disappear/reappear popping when hovering near the detail distance boundary.

## Runtime User Settings Workflow

You can apply user-controlled render/density values at `Start` (or any runtime point) via the global Flora volume components:

```csharp
var sceneSettings = FloraSceneSettings.GetOrCreate();

var render = sceneSettings.GetGlobalRenderSettings();
render.MaxRenderDistance.Override(userRenderDistance);

var density = sceneSettings.GetGlobalDensitySettings();
density.GlobalDensityMode.Override(FloraDensityMode.RenderersOnly);
density.GlobalDensity.Override(userDensity);
```

Use `Override(...)` instead of assigning `.value` directly, so the volume parameter is actually active.

## How To Verify

* Disable `EnableRendering` and confirm Flora-rendered content disappears.
* Disable `EnableTerrainFoliage` and confirm terrain foliage returns to non-Flora behavior.
* Change the detail streaming controls and verify streaming behavior near distance boundaries.
