I have a World Space Canvas where I have a text object which is always rendering on top. I checked that it has UI/Default Shader attach. Is there any way available to not render always on top, the 3d UI text.? Any built-in or custom shader available to restrict it? I tried diffuse shader but now the text is not readable. I have also tried a shader from another post at gamedev but the problem is still persist.

  • \$\begingroup\$ have you tried editing the sortingOrder of the Canvas (in inspector or from code) ? \$\endgroup\$ – Omar Guendeli Nov 12 '18 at 11:49
  • \$\begingroup\$ No, I didn't tried it yet. I should need to read it first \$\endgroup\$ – Muhammad Faizan Khan Nov 12 '18 at 11:54
  • 2
    \$\begingroup\$ I'm not quite sure what you are asking? If you're using a world space canvas then your UI will already be rendered like any other world space object, so If you want it to render behind/in front of some other gameobject you could just move it further/closer to the camera. \$\endgroup\$ – ZombieTfk Nov 12 '18 at 14:27
  • \$\begingroup\$ @OmarGuendeli said right I think you should try it same question \$\endgroup\$ – Seyed Morteza Kamali Nov 12 '18 at 16:05
  • \$\begingroup\$ @SamJudge Yeah you are right, i have world space canvas but actually its text is always rendering on top that i want to restrict. \$\endgroup\$ – Muhammad Faizan Khan Nov 13 '18 at 4:21

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.