Canvas integration

Hello there,

Sorry for a so simple question but, I would like to add an UI in my project to display score, life etc classic stuff.
I used Canvas as World Space Render mode as the documentation says, I add an RawImage in there (white) but I doesn’t see anything.

What did I missed ?


Original Post on Discord

by user 224464722878005248

It looks like your canvas is huge?

Hmm could be but Does the size is taken in count ?
It’s not render “on the screen” by default in all the canvas ? Regardless of the size and position of the canvas ?
Do there is a sample for that ?

by user 224464722878005248

by user 224464722878005248

I need to put the SceneRoot in the canvas I think

by user 224464722878005248

no a world space canvas is placed in worldspace - the size and positioning in the world matters.

You can find a sample in Samples Projects | Needle Engine Documentation

you need to put the canvas in a GltfObject (exported gltf/glb)

Ok I find it
It’s could be cool to add the screen space overlay for that :wink:
Or I will try to do the overlay with html component

by user 224464722878005248

If you want screen space you could parent to the camera and put it as close as needed to the camera near plane.

by user 943936853348855838

That only works “kind of” tho - since it will not be possible to anchor anything that way and things might be cut off depending on screen sizes

Yes It was an idea but too approximate sans I used HTML

by user 224464722878005248