Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 $$anonymous$$ · Sep 01, 2018 at 04:24 PM · canvaspanel

how is it decided that which panel should be on top of another ?

so theres 1canvas that houses all the buttons in the scene, like running and jumping and everything else
different scene has different buttons so every scene has 1canvas

there is another canvas that has a panel that houses buttons like go back to main menu, save the progress, load last save game, etc
these buttons are same no matter what scene user is in, so anotherCanvas has DontDestroyOnLoad function on it
and panel stays inactive in scene untill user presses back button and than panel pops up with save, load, exit buttons
now heres the problem.
panel does pop up but it stays behind buttons in 1canvas
so when user presses back button, save,load,exit buttons does appear, but jump,run buttons stay on top of them.
how do I make it right ?

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 $$anonymous$$ · Sep 02, 2018 at 05:41 AM 0
Share

Things I tried

  1. putting anotherCanvas below 1canvas - but that thing only works for things within a canvas, not for different canvases

  2. SetAsLastSibling() SetAsFirstSibling() - but it only works for things within the canvas, not for things from another canvas

  3. change transform.position.z of panel of anotherCanvas - from script, I made z value of panel (because z value of canvas doesnt change) from 0 to 1, so it does appear on top in SceneView, but in GameView it appears behind canvas1

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Rexidecimal · Sep 02, 2018 at 08:25 AM

Have you tried modifying the sort order? If you put the back menu canvas as a higher sort order it should appear on top of the other canvas ex. game as 0, back menu as 1

Comment
Add comment · Show 1 · 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
avatar image $$anonymous$$ · Sep 03, 2018 at 04:43 AM 0
Share

that worked thanks.

avatar image
0

Answer by Momcat · Sep 02, 2018 at 06:03 AM

It should be that the items that are listed in the hierarchy first are the first to appear, and each item listed after that should appear on top of it. So if your hierarchy says: Canvas1 Canvas2 Canvas3

then the order they should appear in the game view is, Canvas1 in the background, Canvas2 in the middle, and canvas3 on the very top.

Is that what you're asking?

Also you can always disable the conflicting canvas temporarily.

Comment
Add comment · Show 1 · 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
avatar image $$anonymous$$ · Sep 02, 2018 at 08:16 AM 0
Share

hi, thanks for the reply.
unfortunately, it doesnt work.
there are 2 canvases, canvas1 is scene specific, canvas2 is common among scene and has dontdestroyonload function attached to it. so obviously when scene starts scene specific canvas1 is already there and canvas2 is born afterwords. so it should come on top, but it doesnt.

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.

Follow this Question

Answers Answers and Comments

96 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Screen to canvas space 2 Answers

Fit application to any device resolution 1 Answer

Scaling Canvas (or panel) and then trying to move a gameobject (child) attached to it 1 Answer

[4.6 GUI] Displaying my pause menu when ESC is pressed 2 Answers

[Solved]Why my Unity Button's Positions are different. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges