Create an Octagon Shaped Sprite / Tile

I’m trying to create an octagon shaped tile, basically for creating a top down 2d world map.
I attempted to make one by:

  1. Going to Assets->Create->Sprites->Hexagon,
  2. Clicking on the newly created sprite in the Assets window, selecting edit sprite, and changing the number of sides from 6 to 8
  3. Dragging the asset into the scene, and trying to apply a material to it that I got from the asset store.

This resulted in an incompatibility error you see in the screenshot. I’m sure I’m just doing this the wrong way. Any advice?

108713-untitled1.png

I think part of the problem is I don’t think I’m understanding the different terms in unity, e.g. sprite, material, texture, mesh. When I’ve created games from scratch (many years ago), I would create an image (sprite) and set a color to act as a mask (effectively making pixels of the image transparent if they matched that color).

Sprites are for 2D objects and a 2d object has the Sprites-Default material attached in order to display image assets.

The above is different from what your trying to do. I think you want to use a Quad.

A Quad is like a 2D object but it is considered to be a 3D plane.

With this you can use the process that you utilized above, just like any other 3D object by attaching materials.

GameObject > 3D Object > Quad