> For the complete documentation index, see [llms.txt](https://docs.viverse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viverse.com/polygon-streaming/integrations-and-plugins/polygon-streaming-unity-sdk/stream-controller-settings.md).

# Stream Controller Settings

The ***`StreamController`*** is the scene-level manager for all streaming models. It drives LOD selection, manages triangle budgets, and runs occlusion culling. There should be one ***`StreamController`*** per scene.

### Key Inspector Fields

| Field                        | Default       | Description                                                                                                            |
| ---------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Viewer Camera**            | —             | Camera used for LOD and occlusion decisions. Falls back to `Camera.main` if unset.                                     |
| **Triangle Budget**          | 3,000,000     | Maximum triangles in the scene. Recommended: at least 30% of total polygons you plan to stream.                        |
| **VRAM Budget**              | 0 (unlimited) | Maximum GPU memory in MB. 0 = no limit.                                                                                |
| **Distance Factor**          | 1.1           | Preference for nearby objects. Above 1 = favor nearby; below 1 = favor distant; 1 = neutral.                           |
| **Close Up Distance**        | 3             | Distance (meters) at which Close Up Distance Factor kicks in. 0 = disabled.                                            |
| **Close Up Distance Factor** | 5             | Distance factor when camera is closer than Close Up Distance.                                                          |
| **Distance Type**            | Bounding Box  | `BoundingBox` (nearest edge) or `BoundingBoxCentre` (center point). Use `BoundingBoxCentre` for walkable environments. |
| **Max Download Size MB**     | 16            | Concurrent download throttle.                                                                                          |
| **Maximum Quality**          | 0             | Cap on LOD improvement. 0 = no cap.                                                                                    |

### Occlusion Culling

| Field                 | Default | Description                                                                         |
| --------------------- | ------- | ----------------------------------------------------------------------------------- |
| **Occlusion Culling** | `true`  | Raycast-based dynamic occlusion culling. Requires a layer named `PolygonStreaming`. |
| **Time Slicing**      | 120     | Frames to accumulate before hiding an occluded object.                              |
| **Rays Per Frame**    | 256     | Occlusion rays cast per frame.                                                      |

> Occlusion culling requires a layer named exactly **PolygonStreaming** in **Edit > Project Settings > Tags and Layers**. The SDK auto-creates this layer in the Editor.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.viverse.com/polygon-streaming/integrations-and-plugins/polygon-streaming-unity-sdk/stream-controller-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
