Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

HI, does anybody know how to I instantiate a tiled map via code? I am trying and nothing.... Also I am using the light system made by unity to iluminate 2d games, does it work along with this?

Hi there, marcospdsf. You should be able to instantiate the prefab created by the Tiled map importer the same you would any other prefab. (Note that most users just drag the prefab into their scene hierarchy though.) Are you getting any errors?

(2 edits)

I need to store it in a variable, Wich I don't know the type, like is it a Image, a GameObject, or there is something like SuperTiled, need to call any method or import anything? The to instantiate, is it just instantiate(gameobject-tiled-image)? 

I already tried some of those, but it didn't let me use, obviously 'cause it thinks it is not the type.

And I am really thankful for the answer

(2 edits)

The prefab should be able to be stored or referenced as a GameObject like other prefab instances. It's possible I'm not understanding you fully, however, so it may be best to send me your project and point me to the code that is attempting the instantiation. (sean@seanba.com)

Just sent you a email, thank you :D