I'm facing a rendering issue in Unity involving a GameObject that uses a layer from a Tile Palette. I’m utilizing a Tilemap for my game’s environment, and my camera is set to Perspective. While the rendering works fine for individual objects, when my main GameObject, which has this Tile Palette layer, interacts with the Tilemap, the rendering does not respect the correct sorting based on height. This results in some parts of the object being drawn above or below the tilemap incorrectly.
I need Unity to treat the Tile Palette layer as part of the same rendering context and correctly sort it based on the height (Y-axis) relative to the Tilemap. I have already tried adjusting the Transparency Sort Axis to (0, 1, 0) and tweaking Sorting Layers and Order in Layer, but the issue persists.
What I've tried: Setting the Transparency Sort Axis to (0, 1, 0). Manually adjusting the Order in Layer values for the Tile Palette layer. Adding a Sorting Group component to the main GameObject, but since there isn’t a traditional parent-child relationship, this didn’t resolve the problem. Adjusting the orientations and Sorting Layers, considering that the camera is in Perspective, but it hasn't fixed the issue either. Question: How can I adjust the rendering order so that the Tile Palette layer in my GameObject is rendered correctly relative to the Tilemap, considering the height (Y position) of the object and the fact that my camera is in Perspective mode? Is there an effective way to manage the rendering order for a Tile Palette layer within a single GameObject?
Any help or guidance would be greatly appreciated!