Hi guys, I’m trying create Roguelike game.
I want to switch tile-maps with every floor,
because of this I created object with factory API, and I got tile as follows.
-- Create game object that has tile-map.
local floor_name = "floor1_factory"
self.floor = factory.create(floor_name)
pprint(self.floor) -- hash("/instance0")
-- Get tile from other script.
local x = 1
local y = 1
local tile = tilemap.get_tile("/instance0#tilemap", "layer1", x, y) -- Now, URL is hard-coded.
I want to get URL like a “/instance0#tilemap” as string.
How do I get component’s URL, if I create object with factory API.