Replies: 1 comment
-
Please add your support there, thank you for opening |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, I was trying to create switches that rotate certain tiles in my TileMap. The solution I came upon was creating a custom Resource that holds a dictionary of
Vector2i
and@export
ing that in my TileMap's attached script. This way I could use the editor and mouse over the tiles in the TileMap for the switch and target tile, then manually insert them into the dictionary in the inspector. When the TileMap loads and runs it's script, it will find the tiles that match the custom data id for the switch, and use that tile coordinate as the key in the dictionary to get the target tile value, then create a Switch scene, add it to the world at the position of the tile, and assign the target tile coordinate to a variable in the Switch scene script.This seems unnecessarily complicated, and I suggest adding a feature to the editor when editing TileMaps that allows you to edit the custom data for each tile in the map. Even maybe the ability to paint custom data over the tiles; that would be really nice. This seems like you should logically be able to do this since you can set and get custom data from code. If this feature were implemented, it would have made my job a lot easier, and no doubt will make many people's jobs easier because custom data is not limited to allowing switches to rotate tiles. This just seems like a no-brainer feature for the built-in TileMap editor because it's so basic.
Beta Was this translation helpful? Give feedback.
All reactions