> For the complete documentation index, see [llms.txt](https://wiskered.gitbook.io/terraforge-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiskered.gitbook.io/terraforge-documentation/how-it-works/global-settings.md).

# Global Settings

The Global Settings window in TerraForge 2 allows you to configure and manage various global parameters and assets used throughout the TerraForge system.

## **Opening the Window**

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

<figure><img src="https://1503389242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmAcFth2IS05hBefll31s%2Fuploads%2FcpJlNWLYdlMnwxuzFBma%2Fimage.png?alt=media&amp;token=d8b05f39-5ba2-41c2-99a6-359a5af6f001" alt=""><figcaption></figcaption></figure>

***

## **Interface Overview**

<figure><img src="https://1503389242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmAcFth2IS05hBefll31s%2Fuploads%2FKitsDS5OoSVhKkC9yE4M%2Fimage.png?alt=media&amp;token=817123f3-fc6d-484a-a447-2b9320c9da55" alt=""><figcaption></figcaption></figure>

The window is divided into sections, each managing different aspects of the global settings:

1. **Editor GUI Settings**
   * **Enable Caution and Confirmation Windows**
     * **Type:** Toggle
     * **Description:** Toggle this option to enable or disable caution and confirmation dialogs within the editor.
2. **Generation Settings**
   * **Delay Between Automatic Generating Operations**
     * **Type:** Slider
     * **Range:** 100 to 1000
     * **Description:** Adjust the delay between automatic generation operations to manage performance and responsiveness.
   * **Path to Save TerrainData in the Editor**
     * **Type:** Text Field
     * **Description:** Define the path where terrainData will be saved in the editor.
3. **Object References**
   * **Default Terrain**
     * **Type:** Object Field
     * **Description:** Assign the default TerraForge terrain prefab.
   * **Default Terrain For Grid**
     * **Type:** Object Field
     * **Description:** Assign the default TerraForge terrain prefab for grid generation.
   * **Biome Preview Terrain**
     * **Type:** Object Field
     * **Description:** Assign the prefab used for biome previews.
   * **Default Terrain Grid**
     * **Type:** Object Field
     * **Description:** Assign the default terrain grid prefab.
   * **Default TerrainData**
     * **Type:** Object Field
     * **Description:** Assign the default TerraForge terrain data.
   * **Biome Preview TerrainData**
     * **Type:** Object Field
     * **Description:** Assign the terrain data for biome previews.
   * **Hydraulic Erosion ComputeShader**
     * **Type:** Object Field
     * **Description:** Assign the compute shader used for hydraulic erosion.
4. **Auto Assign Objects**
   * **Type:** Button
   * **Description:** Automatically finds and assigns default assets for the settings.

***

## **How to Use**

1. **Adjust Settings**
   * Configure editor GUI settings and generation delays.
   * Assign the necessary GameObject and TerrainData references.
2. **Auto Assign Assets**
   * Click the **Auto Assign Objects** button to automatically load and assign default assets from the Resources folder.
3. **Save Changes**
   * Changes are automatically saved, but you can force save by clicking outside the editor window or making additional changes.

***

## Quick Script Overview

* **TerraForgeGlobalSettings.cs**
  * **Purpose:** Defines the global settings used by TerraForge and provides a singleton instance for accessing these settings.
  * **Key Properties:** Includes settings for confirmation dialogs, delays, prefabs, and shaders.
  * **Methods:** Provides a singleton access point and a method for reloading the settings.
* **TerraForgeSettingsWindow\.cs**
  * **Purpose:** Implements the editor window for managing global settings.

***

## **Additional Notes**

* **Automatic Assignment:** The Auto Assign feature helps to quickly set up your global settings by loading assets from the Resources folder, ensuring that all necessary references are correctly assigned.
* **Resource Management:** Ensure that all referenced assets are correctly placed in the Resources folder to avoid missing references.
