How do I load in Tilemap data in defold?

In my current system, I am planning on switching out tilesets while keeping the collection the same, I’ve decided to go about this by wiping the board clean (7x7 grid) and using tilemap.SetTile() and a for loop to implement the new tilemap

the issue I’m having is that I don’t want all the tilemaps loaded in at once, so I created an unloaded folder full of tilemaps, where it can be picked out.

Is there a way to get the tilemap data from an unloaded file and extract the data to a script instance?

Tilemaps need to be within a game object. You could do this then use factory.create to dynamically create a gameobject containing your tilemap when needed.

2 Likes