# Load Biome Settings

## **Opening the Window**

To open the `Load Biome Settings` window, navigate to: **`Tools > TerraForge 2 > Load Biome Settings`** in the Unity Editor menu bar.

<figure><img src="/files/YvTeYNNbGKE1KpZctZSU" alt=""><figcaption></figcaption></figure>

***

## **Interface Overview**

<figure><img src="/files/ILnXNhNBGH09HAn1ZdMG" alt=""><figcaption></figcaption></figure>

The interface includes fields and buttons for selecting the terrain generator and biome settings:

* **Terrain Generator**
  * **Type:** Object Field
  * **Description:** Assign the `TerraForge Terrain Generator` to which the biome settings will be applied. Drag and drop the component from your scene into this field.
* **Biome Settings**
  * **Type:** Object Field
  * **Description:** Assign the `Biome Settings` file from which the settings will be loaded. Drag and drop the saved Biome Settings asset into this field.
* **Load and Apply Biome Settings**
  * **Type:** Button
  * **Description:** Click this button to load the biome settings from the specified file and apply them to the selected terrain generator.

***

## **How to Use**

1. **Assign the Terrain Generator**\
   Drag and drop the `TerraForge Terrain Generator` component into the Terrain Generator field.
2. **Assign the Biome Settings File**\
   Drag and drop the Biome Settings asset into the Biome Settings field.
3. **Load and Apply Settings**\
   Click the Load and Apply Biome Settings button. This will transfer the settings from the file to the terrain generator, updating its configuration.

***

## Quick Script Overview

* **`ShowWindow()`:** Opens the `Load Biome Settings` window via the Unity menu.
* **`OnGUI()`:** Renders the interface for selecting the terrain generator and biome settings. Includes a button for loading and applying the settings.
* **`LoadAndApplyBiomeSettings()`:** Handles loading settings from the `Biome Settings` file and applying them to the `TerraForge Terrain Generator`. It updates terrain height, terrain layers, and hydraulic erosion layer settings. Displays error dialogs if either field is not assigned, and a success dialog upon successful application.

***

## **Additional Notes**

* **Error Handling:** If either the `Terrain Generator` or `Biome Settings` file is not assigned, an error dialog will prompt you to provide the necessary information.
* **Success Confirmation:** A confirmation dialog appears upon successful application of the settings, indicating that the biome settings have been applied correctly.


---

# Agent Instructions: 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:

```
GET https://wiskered.gitbook.io/terraforge-documentation/how-it-works/load-biome-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
