• 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 /
  • Help Room /
avatar image
0
Question by Kieferer · Jun 16, 2021 at 12:31 AM · uiscenecanvas

Should we keep UI Canvas in Scene?

I hope META will be the right place for this question/request, sorry if I'm wrong.

So, I use Unity since 2014 and this is my favourite game engine, I'm almost totally fine with it, but there is some deficiency or things that annoy me.

The Vector3.zero position relative to Scene space is the centre almost all of my games, so I spend a lot of times there, and always annoy me the UI Canvas, because I can't move it, I can't hide it. It always starts at 0,0,0 and always obscure something that is important for me. I don't know why it should be in the Scene (I think the engine's other segments improved a lot since this UI solution, it need an upgrade in my view), I hope u guys will make a new platform for it, like for the Animator & Shader Graph.

Comment
Add comment · Show 3
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 Hellium · Jun 16, 2021 at 10:18 AM 1
Share

The UI Toolkit might interest you.

I'm not sure it's ready for production since the package is currently in preview.

Remember that you can hide the canvas from the scene by clicking on the eye icon next to the object in the hierarchy.

Note: Don't expect anyone from Unity Technologies to see your post. Better post on the forum.

avatar image Kieferer Hellium · Jun 17, 2021 at 09:37 PM 0
Share

Thank you for your reply! I didn't hear about the UI Toolkit, but it especially looks like what I waiting for! I assumed that I won't get a reply from an engine developer, but what you said was helpful enough. (I know that I can hide the Canvas in the hierarchy, but then it's also hidden in game mode, the better option for me to hide it by the gizmos, but then I should frequently change between visible and invisible. I need a window that I can handle separately like the UI Toolkit you mentioned)

avatar image Hellium Kieferer · Jun 17, 2021 at 10:01 PM 1
Share

I know that I can hide the Canvas in the hierarchy, but then it's also hidden in game mode

You don't need to disable the object, you can only hide it in the scene

https://docs.unity3d.com/Manual/SceneVisibility.html

alt text

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by GetLitGames · 3 days ago

So first, Canvas can be screen space or world space.. but second, once you get used to screen space it's really useful. You anchor UI to left/right side of screen, or centered. Once you learn correctly building UI to stretch for different resolutions, you will see the usefulness of screen space. For Overlay Canvases, you should generally have "Scale with Screen Size" selected and Expand works well but I usually use "Match Width or Height" with the Height setting because we have widescreens are common. Get used to using a pattern where you create Canvases (you should have many) with an immediate Panel child that is Stretched full width and height, then maybe another Panel below that is the one you actually want to size to show a window or popup. That way you can add a Panel that blurs the background (the entire screen) or darken the background etc. But you will also notice that if you move that stretched Panel, it stays the same size of the full screen (the Canvas) but you can still move it around. If you create your own script that set's the transform to be Vector3.zero in Awake() and add it to that Panel then you can move those Panels around and work with them in the editor conveniently without them being ontop of each other or having to toggle things on and off constantly so you can see. You should be creating many Canvas with Panels.. and not just have one Canvas with everything in it.. Unity has to redraw everything when one element changes, as well as some other reasons.. Not for every little control, but you should have a pattern where you generally create multiple top level Canvas.

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.

Follow this Question

Answers Answers and Comments

229 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 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 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

I can't use any UI elements in my Project 0 Answers

Share button AR 0 Answers

Changing Resolution in game messes up UI and Mouse Input 0 Answers

C# - Creating Canvas UI button on click in code 2 Answers

How to physics raycast through overlay UI? 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