r/UnityHelp • u/Silent_Reputation596 • 11h ago
SPRITES/TILEMAPS Storing data on individual tiles?
I have a proc gen tilemap system and I need each tile to have it's own copy of a script to be able to pull and assign data to. All the tiles are rule tiles, idk if that makes a difference. How would I do that?
1
Upvotes
1
u/Vonchor 11h ago
It's not clear exactly what you're trying to do - 'own copy of a script' means what? Private instance data for each tile?
If that's the case, then If you clone a tile before placing it the tile becomes its own instance and no longer connected to the project folder asset. Any instance fields in the tile are independent. If you're saving a scene pre-created this way then the cloned tile is saved with the Tilemap when you save the scene.
Never tried this approach with Rule tiles though - ought to work.
Hope this helps