TERRAFORGE Documentation
  • WELCOME!
    • πŸ‘‹Hello!
    • 🏷️Supported Unity Versions & RPs
    • πŸ—ΊοΈRoadmap
    • πŸ–οΈChangelogs
    • 😎Support & Community
    • πŸ‘½FAQs
  • GETTING STARTED
    • πŸ”ŒInstallation & Setup
    • πŸŽ–οΈCreating New Terrains with TerraForge 2
    • β›΅Demos & Samples
  • HOW IT WORKS
    • 🧾Documentation & Code
    • πŸ—»Terrain Generator
    • ⛰️Terrains Grid Generator
    • πŸŒ‹Biomes Settings
    • 🏝️Terrain Painter
    • πŸ˜‡TerraForge Helper
    • βš™οΈGlobal Settings
    • πŸ“₯Save Biome Settings
    • πŸ“‡Load Biome Settings
    • πŸ’ͺRuntime Scripting API
Powered by GitBook
On this page
  • Opening the Window
  • Interface Overview
  • How to Use
  • Quick Script Overview
  • Additional Notes
  1. HOW IT WORKS

Load Biome Settings

The Load Biome Settings window allows you to load and apply saved biome settings to a TerraForge Terrain Generator.

PreviousSave Biome SettingsNextRuntime Scripting API

Last updated 10 months ago

Opening the Window

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


Interface Overview

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.

πŸ“‡