engine icon indicating copy to clipboard operation
engine copied to clipboard

Create API to assign a material to a text UI element

Open yaustar opened this issue 2 years ago • 2 comments

We can do so with the image element via https://developer.playcanvas.com/api/pc.ElementComponent.html#material

Can we do the same to the text element?

yaustar avatar Mar 01 '22 16:03 yaustar

Forum link for reference https://forum.playcanvas.com/t/using-post-effects-bloom-with-world-ui-causes-depth-issues/24455/16?u=adriaaaaan.

Without this I don't believe its possible to correctly use ui elements in 3d space without z ordering issues due to depthWrite being false. I would like to switch this along with alphaToCoverage on a text element.

Keep up the good work everyone!

Adriaaaaan avatar Mar 01 '22 17:03 Adriaaaaan

Hi, Guys Currently it would be great to have that feature. I use vertex shader in my 3D scene where I have text elements in World layer, so I need to apply the shader to the text element's material too. Thanks!

KingMaks avatar Jun 06 '22 17:06 KingMaks