- Home /
3D object in uGUI
Is there a way to display a 3D gameobject in the new 4.6 uGUI? I know you could do it in nGUI, and i am trying to convert my nGUI setup over to uGUI.
Answer by StianC · Sep 29, 2014 at 07:18 PM
Thanks for all the responses but I managed to solve the problem. I created my own GUI Camera off to the side and set the Canvas relation to Screen Space - Camera. I was able to mess with the render depth of the objects from there on and get the object to render over the GUI background.
Answer by HarshadK · Sep 24, 2014 at 05:47 AM
Surprisingly I tried as @BoredMormon suspected and did a setup in 5 minutes. And found out that you can actually add other 3D game objects as the child of a Canvas.
And you can even position them in relation to camera by adding a RectTransform component to that 3D game object.
A lot of people got it in there head that the new UI was actually something new. Ultimately its just a bunch of new components you can play with. Everything underneath is still just GameObjects. GameObjects are still driven by what components you attach.
@Harshad$$anonymous$$ Thanks for verifying this for me. I'm not on my Unity computer at the moment.
This components system used to create UI elements is actually great since it allows you to be flexible with things you can do.
And still waiting for Unity to make those components open source cause it will open a whole new arena for us. :-)
Happy to help. :-)
I tried doing that but i couldn't get the the object to display over my gui background.
Can you provide some inputs as to what you have tried? Because it worked for me.
On a side note, the 3D object will appear flat in Render mode 'Overlay' for canvas.
Answer by christoph_r · Sep 22, 2014 at 09:58 PM
Unfortunately not. For the moment, you'll have to tie in your 3D game objects into the rest of your GUI with custom scripts.
EDIT: Looks like I was mistaken :)
I'm surprised at this. 3D objects are simply mesh renderer components added to a GameObject. In theory there is no reason why they shouldn't work as children of a canvas. Has anyone actually tried this in Unity?
Your answer
Follow this Question
Related Questions
How to position 3D-GUI-Mesh on change of aspect ratio? 0 Answers
Button then instanitates gameobject 1 Answer
Procedurally generated uGUI elements render under world space objects 1 Answer
The GameObject contain the GUI 0 Answers
Jump on the ground 2 Answers