Let’s assume two collections: game and level. Game collection has a factory to create a level collection, that has a tilemap inside.
Is it possible somehow to use tilemap.get_tile()
to get a tile from a tilemap that is in a collection created by factory?
Because, when I try to use tilemap.get_tile(url_to_a_tilemap_in_created_collection, ...)
I have an error:
ERROR:SCRIPT: /modules/platformer.lua:430: function called can only access instances within the same collection.
(There could be different level’s collection with different tilemaps loaded, but in game collection there are a player and many common game objects, so that’s why I’ve chosen such hierarchy)