- Home /
GUI in front of 4.6 UI
Hi guys i need an help to an issue that make me crazy. So i have a canvas in render mode "Screen Space - Camera" with all component to render sprite...then i have also a healthbar system with old GUI concept that works very well, the only problem is that is render on top of new UI. I try many time with depht but doesn't work.
I tried also with UI and slider and it's work but with Render Mode "Screen Space - Camera" but my only doubt is , the slider that i made with new UI is visible only for me and i want build a multiplayer game with this is not the best solution.
With "Screen Space - Overlay" doesn't work for me, the slider stay up to the other sprite.
The camera has attached a script for RTS camera (move the mouse on border of the screen move the camera up,down,left,right)
I hope that what i wrote is easy to understand , and sorry for my language but i'm italian.
I hope in a good person that make me to right way with this issue.
Thanks to all.
Cheers
I never managed to make this work. I don't have any concrete proof, but I believe it's simply not possible. The best solution is AFAI$$anonymous$$ what RafixWPT wrote; replace the old GUI by re-implementing everything for new GUI.
For completeness: an ugly, slow, inefficient workaround would be this: render new GUI to a texture ins$$anonymous$$d of screen and then draw this texture in old GUI in depth you want. Highly not recommended!
Answer by RafiXWPT · Aug 23, 2015 at 10:24 AM
Why won't you replace that old GUI code with new UI? http://answers.unity3d.com/questions/794503/how-can-i-use-unity-46-gui-to-have-a-health-bar-th.html
It will be much easier to controll if you will have 2x canvas, one camera, one word space, which will be under first UI.
Your answer
![](https://koobas.hobune.stream/wayback/20220611230324im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Screen space canvas not resizing correctly when android device is rotated 0 Answers
[VR] How to display a canvas with Oculus 5 Answers
Good way to scale 3D GameObjects in a Canvas (Screen Space - Camera)? 1 Answer
Custom Dropdown Sorting Order problem 2 Answers
Unity 4.6 adding a Canvas Text onto a gameobject prefab?? -1 Answers