• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Michealunity · Jul 08, 2015 at 08:03 PM · guiuicanvashealthbarscreenspace

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. alt text

alt text

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

gui-over-ui.jpg (224.6 kB)
canvas-screen-mode.jpg (221.6 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Inaetaru · Aug 23, 2015 at 10:48 AM 0
Share

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!

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Screen space canvas not resizing correctly when android device is rotated 0 Answers

Problem with build version 1 Answer

4.6 UI Canvas is smaller than normal 1 Answer

uGUI Mask Content 0 Answers

Procedurally generated uGUI elements render under world space objects 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges