0

I'm working in 2D project. I have 2 mesh renderers in unity and I want to set their draw order one above other. But there is no "order in layer" option like sprite renderer has. What can be done to solve this problem ?

I have 3d object which I imporeted into my 2d scene. and also I have object with mesh renderer text. When I move my 3d object closer to camera it can jump over different sprites in the scene so I can put it above all. But when mesh renderer text object appears it tops everything. and it does not metter how I move my 3d object. mesh renderer text object remains on top, even If I see in the editor that it is below.

LAST UPDATE: here in this picture I've added 3d text. default layer in 3d we can see its below, but in game screen u see it's above :( enter image description here

enter image description here enter image description hereThis is parameters of text object

David
  • 4,332
  • 13
  • 54
  • 93

1 Answers1

0

You should be able to set your depth/draw order settings in your camera inspector. https://answers.unity.com/questions/1208739/how-to-change-draw-order.html Also create a text gameobject instead of an Ui text

J.Algaba
  • 76
  • 8
  • That's just controlling the draw order of the cameras... not the 'MeshRenderers' [See here](https://docs.unity3d.com/ScriptReference/Camera-depth.html) – dome12b Jun 22 '18 at 07:44
  • I had -1 on my camera depth. I tried to play with it , set different values but nothing happened. Also please read update of my question. – David Jun 22 '18 at 07:44
  • @David, Problably you have created the text on the UI Layer and it will work at expected – J.Algaba Jun 22 '18 at 07:47
  • I think you are right. Its in canvas But is there way to create it in layer where my 3d object is ? If I manually put it under my 3d object in scene it does not change anything :( probably I must create it somehow differently? – David Jun 22 '18 at 07:50
  • Yes, create a 3d text( Its similar of creating a cube) instead of an UI Text . @David – J.Algaba Jun 22 '18 at 07:52
  • made 3d text and it's the same as my previous text. it has mesh renderer and text mesh params. And even if I place it below my 3d object it stays above :( – David Jun 22 '18 at 08:16
  • Change the Layer to default and place it out of the canvas – J.Algaba Jun 22 '18 at 08:18
  • Did that but not helped. Check last update with picture please – David Jun 22 '18 at 08:24
  • Create a children of the spaceship and place the text, it doesnt have any sense to have 2 mesh on the same object – J.Algaba Jun 22 '18 at 08:26
  • created child from spaceship, does not help :( – David Jun 22 '18 at 10:03