【发布时间】:2014-01-22 09:09:01
【问题描述】:
我希望仅使用脚本(最好是 c#)而不是编辑器上的菜单选项来统一创建一块地形。到目前为止,我只有下面的这段代码,但我不知道下一步该怎么做才能让它出现在现场,有人可以帮忙吗?
谢谢
using UnityEngine;
using System.Collections;
public class terraintest : MonoBehaviour {
// Use this for initialization
void Start () {
GameObject terrain = new GameObject();
TerrainData _terraindata = new TerrainData();
terrain = Terrain.CreateTerrainGameObject(_terraindata);
}
// Update is called once per frame
void Update () {
}
}
【问题讨论】: