0
\$\begingroup\$

Is it possible to add a nice outline to a unity tilemap?

For example, if my tilemap looks something like the image on the left, I want to make it render like the image on the right: Two images of identical blocky shapes, except the one on the right is outlined.

I found this discussion on the Unity forums where someone suggests putting a black sprite below the tilemap to create this effect, but that could be resource intensive and quite complicated for my project (I have lots of weirdly shaped tiles). The link to a tutorial there seems to create an outline around each tile, rather than the more complicated shape of a tilemap, which is not desirable.

What can I do which will allow this outline to be created, in a way which is easily reusable for differently shaped tilemaps?

For clarity, I'm looking at something like this in the Unity Editor:

A picture of the Unity Editor showing a tilemap called Tilemap, as well as another GameObject called player

I'd want my outline to render around the Tilemap GameObject. It should look a bit like the orange outline in the Unity editor in this image (which appears due to having it selected), but in the actual game.

\$\endgroup\$
2
  • \$\begingroup\$ I might have time to experiment with this while commuting today. Can I check whether you're using the (default) built-in render pipeline or the Universal Render Pipeline? \$\endgroup\$
    – DMGregory
    Commented Apr 16 at 11:25
  • \$\begingroup\$ @DMGregory Great, thanks! I'm using the default built-in render pipeline. \$\endgroup\$
    – Robin
    Commented Apr 16 at 13:01

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.