!!! シーン内のTerrainのGameObjectを取得 using UnityEngine; using System; GameObject[] terrainShapes = Array.FindAll(GameObject.FindObjectsOfType(), (item) => item.GetComponent()); for (int i = 0; i < terrainShapes.Length; i++) { GameObject g = terrainShapes[i]; Debug.Log("[" + g.name + "]"); } とすると、シーン内のstaticなGameObjectをまとめて取得できます。 これは、Componentとして「Terrain」を持つものを探しています。 Terrain terrain = g.GetComponent(); として、Terrainのクラスを取得します。 ---- {{lastmodified}}