Rule Tiles across different (ground/!ground) tilemaps
I am trying to use tilemaps with rule tiles.
I want the player to be able to detect whether a collision is with the ground or a wall.
Before using rule tiles I had two different tilemaps, one for ground tiles and one for the rest. This allowed me to build out my level leaving out only the ground tiles, which I would then add to the ground tiles tile map. The reason I wanted to do this was so that I could TAG my ground tiles tilemap object as "Ground".
I could then use onCollision the gameObject.tag == "Ground".
Now I'm trying out rule tiles which I am finding a great time saver. But I cannot seem to use rule tiles accross multiple tilemaps. The rules work in each map, but they don't work between the two, instead they just overlap each other.
This means that I cannot seperate my tilemaps into two, one for the ground and one for the rest, while also having rule tiles working properly.
So my question is:
1) Can I do anything to make my rule tiles apply across multiple tilemaps, where a newly placed tile doesn't just check what else is on the tilemap it is being placed on, but also what else is on any other tilemap on the same grid? (Ideally I would prefer to be able to do this)
If not, then,
2) Since I am using a composite collider2D for my tilemap, and since I cannot use seperate tilemaps and tag ground tiles specifically, what would be the best way for me to check whether the player has collided with a ground tile or a wall tile?
Thanks for any advice.
I'm having the same problem. I have to separate walls and floors for obvious sorting layer/lighting related issues, but I've just realised that then my RuleTiles won't work.