Hi! So I'm making a 2d top down game and I have an issue with walls.
I need to make it so if the player is standing 'in front' of the wall he will be rendered on top, and if player is 'behind' the wall he will be rendered below.
I know there's a way by making the player a child of the Tilemap and setting Y-Sort to true, but this would break the structure of my game. I will be instancing different tilemaps on runtime and I can't have the player as a child to all of them...
How would you go about making this? Any ideas?

Of course what I DON'T want to happen is what you see on the picture below.
Thanks for your time!