Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

1. Utility Tab

Halil Emre Yildiz edited this page Jan 13, 2024 · 11 revisions

The Utility tab contains the Backupper tool that allows you to backup or restore a Terrain object, and the Resizer tool that allows you to resize a Terrain object.


Backupper Tool

Backupper is a tool that allows you to save or restore the height, texture, hole, tree, grass and other properties of a Terrain object. This tool allows you to create different versions of a Terrain object or revert to previous versions.

Usage

To use the Backupper tool, follow these steps:

  1. Select the Utility tab and enable the Backupper tool.
  2. Select the Terrain object that you want to save or restore.
  3. In the Restore Options section, check the properties that you want to save or restore. The Other option includes the transform, name and other Terrain properties of the Terrain object.
  4. Click on the Save button to backup the Terrain object. The backup file is saved in the Assets/_JSG_DATA/TerrainBackups folder with a .heyTerrainBackup extension.
  5. In the Backups list, you can see the backup files that you have saved. To restore a backup file, click on the Load button. To delete a backup file, click on the X button. With the brush tool on the left of the Load button, you can restore the heights of the painted area.

Variables

The variables and UI elements of the Backupper tool are as follows:

public Terrain Terrain; // The Terrain object that you want to save or restore
[Header("Restore Options")]
public bool Heights; // Save or restore the height property
public bool Textures; // Save or restore the texture property
public bool Holes; // Save or restore the hole property
public bool Trees; // Save or restore the tree property
public bool Grasses; // Save or restore the grass property
public bool Other; // Save or restore other properties (terrain transform, terrain name, other terrain properties)
[Button("Save")] Save(Path = "Assets/_JSG_DATA/TerrainBackups", FileExtension = ".heyTerrainBackup");
// The Save button, which backs up the Terrain object and saves it to the specified folder with the specified extension
[List("Backups", Button('Brush') = RestoreArea(), Button("Load") = Load("File"), Button("X") = Delete("File"))]
// The Backups list, which shows the backup files that have been saved. The Load button restores a backup file. The X button deletes a backup file. The Brush button restores painted area
public List<string> BackedUpFiles; // The list that holds the names of the backup files

Resizer Tool

Resizer is a tool that allows you to resize a Terrain object. This tool allows you to adjust the width, length and height of a Terrain object.

Usage

To use the Resizer tool, follow these steps:

  1. Select the Utility tab and enable the Resizer tool.
  2. Select the Terrain object that you want to resize.
  3. Adjust the Width, Length and Height values as you wish. These values determine the size of the Terrain object in world units.
  4. Click on the Resize button to resize the Terrain object.

Variables

The variables and UI elements of the Resizer tool are as follows:

public Terrain Terrain; // The Terrain object that you want to resize
[Header("Size Settings")]
public float Width; // The width of the Terrain object (world units)
public float Length; // The length of the Terrain object (world units)
public float Height; // The height of the Terrain object (world units)
[Button("Resize")] Resize(Terrain, Width, Length, Height);
// The Resize button, which resizes the Terrain object according to the specified values

Clone this wiki locally