Daniel Lip
Daniel Lip

Reputation: 11319

How can I make that the ui text will be in front of anything else?

I want that the text to be always on the top left corner and always above in front of anything else, objects ui everything.

I want to use this ui text for saving message.

Screenshot of the Canvas settings and where the text is show in the scene window and the game window :

Canvas settings

And the text settings using Text - TextMeshPro :

Text settings

Upvotes: 0

Views: 1009

Answers (2)

A couple things:

  1. Camera-space UI draws on top of everything except other camera-space UI objects and screen-space UI
  2. Screen-space UI draws on top of everything except other screen-space UI objects
  3. Your objects is attached to a World-space canvas

While in theory you could fiddle with drawing order with shaders, this does not apply to UI objects (as the world is rendered first, then camera-space UI, then other cameras and their UIs, then screen-space UI).

As such you will not be able to make that text draw "in front" of anything else. It exists in 3D space and is subject to all of the rules that that entails, such as being behind screen-space canvases.

Upvotes: 1

NSJacob1
NSJacob1

Reputation: 537

You can move your text material up in the render queue if the defaults aren't working for you.

Upvotes: 0

Related Questions