You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
797 B
C#
32 lines
797 B
C#
using UnityEngine;
|
|
|
|
public class TerrainCreator : MonoBehaviour
|
|
{
|
|
[Header("Terrain Settings")]
|
|
[Min(2)] public int width = 64;
|
|
[Min(2)] public int height = 64;
|
|
public float heightScale = 10f;
|
|
public float cellSize = 1f;
|
|
public Material terrainMaterial;
|
|
|
|
[Header("Noise Settings")]
|
|
public float noiseScale = 0.05f;
|
|
|
|
[Header("Forest Preset")]
|
|
public TreeRandomPreset preset;
|
|
public GameObject branchPrefab;
|
|
|
|
[Header("Forest Density")]
|
|
public DensityMode mode = DensityMode.Count;
|
|
[Min(1)] public int treeCount = 20;
|
|
[Min(0f)] public float treesPerUnit = 0.2f;
|
|
|
|
[Header("Randomness")]
|
|
public int seed = 12345;
|
|
|
|
public enum DensityMode { Count, PerUnit }
|
|
|
|
[Header("Editor Settings")]
|
|
public bool autoUpdate = true;
|
|
}
|