using System; using UnityEngine; namespace Game.WorldGen { /// /// One height/slope texture band. Paints where the terrain height /// (in world meters) and slope fall in range, with a smooth fade at the edges so adjacent /// bands blend instead of hard-cutting. Rules are weighted + normalised per pixel. /// You can still refine everything by hand with Unity's paint tool afterwards. /// [Serializable] public class SplatRule { public TerrainLayer layer; [Tooltip("Lowest terrain height (world meters) where this layer appears.")] public float minHeightMeters = 0f; [Tooltip("Highest terrain height (world meters) where this layer appears.")] public float maxHeightMeters = 1000f; [Tooltip("Soft fade width at the height edges, in meters. 0 = hard cut. Bigger = smoother blend.")] public float heightFadeMeters = 10f; [Range(0f, 90f), Tooltip("Min slope in degrees (0 = flat).")] public float minSlopeDeg = 0f; [Range(0f, 90f), Tooltip("Max slope in degrees (90 = vertical).")] public float maxSlopeDeg = 90f; [Range(0f, 45f), Tooltip("Soft fade width at the slope edges, in degrees.")] public float slopeFadeDeg = 6f; [Range(0.01f, 4f), Tooltip("Relative strength when competing with other rules on the same pixel.")] public float weight = 1f; } }