コード例 #1
0
        // Create new terrain game objects
        private void CreateTerrainGameObjects(int mapPixelX, int mapPixelY, out GameObject terrainObject, out GameObject billboardBatchObject)
        {
            // Create new terrain object parented to streaming world
            terrainObject           = GameObjectHelper.CreateDaggerfallTerrainGameObject(this.transform);
            terrainObject.name      = string.Format("DaggerfallTerrain [{0},{1}]", mapPixelX, mapPixelY);
            terrainObject.hideFlags = HideFlags.HideAndDontSave;

            // Create new billboard batch object parented to terrain
            billboardBatchObject                         = new GameObject();
            billboardBatchObject.name                    = string.Format("DaggerfallBillboardBatch [{0},{1}]", mapPixelX, mapPixelY);
            billboardBatchObject.hideFlags               = HideFlags.HideAndDontSave;
            billboardBatchObject.transform.parent        = terrainObject.transform;
            billboardBatchObject.transform.localPosition = Vector3.zero;
            billboardBatchObject.AddComponent <DaggerfallBillboardBatch>();
        }