直接获取TerrainData进行修改即可 using System.Collections; using UnityEngine; using UnityEditor; public class DynamicCreateTerrain : MonoBehaviour { public TerrainData terrainData; private float[,] heightsBackups; void Start() { //var terrain = CreateTerrain();…