- Home /
Best way to show image with text next to image target in Unity
I am new to Unity and learning to play with virtual buttons. I want to press a button and have an image with some texts on it pop up next to the image target. What is the best way to present the image with text?
On a 3D plane with text mesh or on a UI canvas with 2D text? The UI canvas seems like it's mainly for screen navigation and it's harder to adjust the size and position.
UI Canvas is very powerful and it is actually very easy to adjust positions. As well there are 3 spaces of Canvas, There is Screen Space canvas, Camera Space canvas, and World Space canvas. As well as many scaling options. And the ability to convert the screen space from world space makes it really easy to make UI elements that seem 3D. Aside from all that it's really more a matter of opinion and what best suits your situation. Often times I'll make UI interfaces on 3D objects using world space canvases, and make the game camera pan to the UI element.
Thank you @RobAnthem I will look into converting screen space from world space. That is not the same as making UI interfaces on 3D objects using world space canvases and making the game camera pan to the UI element right?
Well converting world-to-screen space is more for like creating tooltips and UI elements that follow or move with 3D objects. Like lifebars and stuff. Whereas I would use world space canvases for things like console interfaces, workbenches, or other interactables that might have an interface. Of course this makes it relatively easy to create mixed 3d/2d UI elements. For example I often times like to have 3d objects in the view area of a world space canvas that are selectable, like when choosing a character in a creation menu, you could have the characters themselves act as buttons.