This repository was archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
1. Utility Tab
Halil Emre Yildiz edited this page Jan 12, 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 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.
To use the Backupper tool, follow these steps:
- Select the Utility tab and enable the Backupper tool.
- Select the Terrain object that you want to save or restore.
- 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.
- 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.
- 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.
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("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
public List<string> BackedUpFiles; // The list that holds the names of the backup filesResizer 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.
To use the Resizer tool, follow these steps:
- Select the Utility tab and enable the Resizer tool.
- Select the Terrain object that you want to resize.
- Adjust the Width, Length and Height values as you wish. These values determine the size of the Terrain object in world units.
- Click on the Resize button to resize the Terrain object.
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