- Home /
Need tiles to contain data or a reference
Hello everyone. I need help with tilemaps. So I have a tilemap and I need the tiles to store an Item class (which is a scriptable object class i created). I created an "Item" for every tile i have. But i need a single tile to reference its own "item" so i can for example grab its particle color(a variable in the Item class) and set the appearing particle color to that(i have a block breaking system which emits the particles of the block you break). I basically need every tile to reference its item(scriptable object). Much thanks to any help (I also posted this on forums but realized it's more appropriate to ask here, sorry for that) Edit: It doesn't have to be scriptable object. Would still work if they can hold like a Color or a sprite so i can directly assign particle color to those