{"__v":4,"_id":"550956df24d561190049ddb9","category":{"__v":2,"_id":"550945111c38c50d006118ad","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["550956df24d561190049ddb9","550958ad1c38c50d006118e5"],"reference":false,"createdAt":"2015-03-18T09:27:45.529Z","from_sync":false,"order":1,"slug":"terrain","title":"Terrain"},"project":"543b9b0065bf840e00b473d5","user":"543b9aa865bf840e00b473d1","version":{"__v":11,"_id":"543b9b0065bf840e00b473d8","project":"543b9b0065bf840e00b473d5","createdAt":"2014-10-13T09:27:28.467Z","releaseDate":"2014-10-13T09:27:28.467Z","categories":["543b9b0065bf840e00b473d9","543b9ef065bf840e00b473e0","54890012f291f61400c02d36","54890902f291f61400c02d3e","54890c43f291f61400c02d44","54890d71c178b40b00aa3086","5508125c0c4d8c19008a5f83","55094050961f17170070abbd","550945111c38c50d006118ad","550a4c2e42fff40d00ae6049","55221c074801a40d00a77610"],"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2015-03-18T10:43:43.264Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"order":2,"body":"Create a new empty GameObject, and add a tk2dsprite component; we already have a Removables collection, with several different sprites. ([Larger preview here](http://cl.ly/image/403o3J2l2R14))\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/NCWZWTZWQqiGdosIvAjo\",\n        \"removables_001.jpg\",\n        \"900\",\n        \"668\",\n        \"#72ad35\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nIf your removable is too big or needs to be spliced in to a top and bottom half like the buildings then simply add the tk2d Clipped Sprite script instead. Make sure you make two of the same removable gameobject and add 'b' and 't' at the end of the names to signify the bottom and top half respectively. Then set the cutoff clip region for the removable on the script.\n\nIf you want to make the removable collidable, you can take a look at the structure of our BattleMap grass/AIObstacles, after you reactivate the mesh renderers - even duplicate one of those cubes and parent it to your removable prefab. Observe the \"Obstacle\" tag on each red cube. These have to be instantiated before the map is scanned for obstacles. ([Larger preview here](http://cl.ly/image/45352S3w013s))\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/eHH8OxbSA6zO34bplbfm\",\n        \"removables_002.jpg\",\n        900,\n        672,\n        \"\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]","excerpt":"How to add decoration objects like rocks, trees, or walls.","slug":"add-objects-to-map","type":"basic","title":"Add Objects to Map"}

Add Objects to Map

How to add decoration objects like rocks, trees, or walls.

Create a new empty GameObject, and add a tk2dsprite component; we already have a Removables collection, with several different sprites. ([Larger preview here](http://cl.ly/image/403o3J2l2R14)) [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/NCWZWTZWQqiGdosIvAjo", "removables_001.jpg", "900", "668", "#72ad35", "" ] } ] } [/block] If your removable is too big or needs to be spliced in to a top and bottom half like the buildings then simply add the tk2d Clipped Sprite script instead. Make sure you make two of the same removable gameobject and add 'b' and 't' at the end of the names to signify the bottom and top half respectively. Then set the cutoff clip region for the removable on the script. If you want to make the removable collidable, you can take a look at the structure of our BattleMap grass/AIObstacles, after you reactivate the mesh renderers - even duplicate one of those cubes and parent it to your removable prefab. Observe the "Obstacle" tag on each red cube. These have to be instantiated before the map is scanned for obstacles. ([Larger preview here](http://cl.ly/image/45352S3w013s)) [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/eHH8OxbSA6zO34bplbfm", "removables_002.jpg", 900, 672, "", "" ], "caption": "" } ] } [/block]