> For the complete documentation index, see [llms.txt](https://apex-studio.gitbook.io/dash-core-endless-runner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apex-studio.gitbook.io/dash-core-endless-runner/02_editor_workflow/biome-and-environment-segment-generation.md).

# Biome & Environment Segment Generation

### Chapter 4: Biome & Environment Segment Generation

Endless runner levels are built using modular environment chunks known as terrain segments. The Environment tab bridges static scene art with runtime stream shuffling.

#### 4.1 Segment Standardization via `EnvironmentBuilderUtility`

&#x20;Every custom environment chunk must be constructed upon a base structure that conforms to the `TerrainSegment.cs` definition. The `EnvironmentBuilderUtility.cs` processes raw environment art chunks by baking essential collision meshes and preparing the asset to interface cleanly with the global `CurvedWorldManager`. This ensuring that vertex displacement parameters operate uniformly across all injected pieces.

&#x20;

#### 4.2 Dependency Auto-Injection

When compiling a complete level template, the setup hub deploys the `AudioBuilderUtility` and `DataBuilderUtility` backend scripts. These modules check the structural layout of the active scene and enforce the creation of unified singleton instances for the `AudioDirector` and `SaveManager`. This guarantees that all required global systems are fully wired and functional before any runtime execution begins.

<figure><img src="https://1429375011-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQO6gSaZAImyfq8TThzBJ%2Fuploads%2FdyWH2RMmcQ2rW8NskqAQ%2FPicture11.png?alt=media&amp;token=9df88f87-a646-46c5-bf43-865c49ddc687" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apex-studio.gitbook.io/dash-core-endless-runner/02_editor_workflow/biome-and-environment-segment-generation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
