0
\$\begingroup\$

I'm using Unity 2019.4.6f1, and I'm working on Isometric Tilemaps.

The hierarchy is like this:

Hierarchy

The VillageScreen is a Canvas, img-bg is an UI Image, the two Panels are UI Panels, and the Grid and two Tilemaps are the isometric tilemaps. The problem is, the Grid & Tilemap is blocking all other UI elements, and it seems to be always on top, no matter how I set the Z value.

The Grid setting is:

Grid Settings

And the Panel setting is:

Panel Settings

My question is: How do I put the UI elements ABOVE the Tilemap?

p.s. the UI button is clickable, it just cannot be displayed properly.

--

UPDATE: Added a mockup screen - Black circles are buttons, while Red texts are UI texts for displaying scores.

Mockup

\$\endgroup\$
  • 1
    \$\begingroup\$ Why is your tilemap in your canvas? Usually this is not a component we would put into a UI Canvas like this. \$\endgroup\$ – DMGregory Aug 24 at 3:38
  • \$\begingroup\$ @DMGregory thanks for your reply, but I would like to display the Tilemap in my game. I downloaded this completed game pack from Asset Store, and it uses various Canvas to represent different screens, instead of using separate scenes. Is it a must to use a separate Scene for this? Thanks in advance. \$\endgroup\$ – Raptor Aug 24 at 3:49
  • \$\begingroup\$ You do not need to place the tilemap into the canvas to achieve this effect. You can swap game objects within your scene without switching scenes - you already do this with canvasses, so there is nothing to stop you from doing it with tilemaps too. \$\endgroup\$ – DMGregory Aug 24 at 3:50
  • \$\begingroup\$ I know I can hide & show elements. However, my issue is that the Tilemap is hiding the UI elements. Let's say I have a toolbar (as a Panel) to show ABOVE the tilemap, but Tilemap is covering all the UI elements (both panels). \$\endgroup\$ – Raptor Aug 24 at 3:55
  • \$\begingroup\$ I have added a mockup screen in my question for better illustrations. \$\endgroup\$ – Raptor Aug 24 at 4:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.