Example #1
0
        private void AddContainerComponents(GameObject GodNode, TerrainData_Full data)
        {
            TerrainObject newTerrainScript = GodNode.AddComponent <TerrainObject>();

            SetScriptFields(data, newTerrainScript);

            foreach (SelectObject script in selectObjects)
            {
                script.terrainscript = newTerrainScript;
            }

            newTerrainScript.ConnectObjectLinks();

            BoxCollider boxColl = GodNode.AddComponent <BoxCollider> ();

            boxColl.isTrigger = true;
            Vector3 collPos = new Vector3(0, 0.5f, 0);

            boxColl.center = collPos;
        }