1
\$\begingroup\$

I'm using Unity ECS entities to draw out some tiles. I would like to determine the layer (or sortOrder) of the rendered tile so that if a tile is placed over another at the same position, the tile with the higher layer value will be visible.

It appears random at the moment. I tried:

entityManager.SetSharedComponentData(entity, new RenderMesh
{
   mesh = mesh,
   material = mat,
   layer = level
});

But it didn't seem to do anything.

\$\endgroup\$

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.