• 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
Question by deprofundiis · Jan 26, 2015 at 12:39 PM · ui

How many canvas per scene? [UI 4.6+]

Couldn't find any direct answer to this so here goes:

I have many objects in my scene that use the new UI features/components/objects as per the image below:

alt text

Each object you can interact with will, at the present moment, have the same structure as the one you see above. Since I am just starting to learn how to use the new UI I have the following doubt: If I have 100 objects in the scene, will I need to have 100 canvas or is the current object hierarchy plain wrong?

Thanks a lot for your time.

screen-shot-2015-01-26-at-123526.png (20.4 kB)
Comment
solkar
felixmann

People who like this

2 Show 4
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 stevecus · Jan 26, 2015 at 04:24 PM 2
Share

It all depends on how the UI is used. For example, if each unit/object has Ui elements that move independently with the object and not the other UI elements ( a good example is health bars) then yes I have found the best way to do it is to have a canvas on each object. I would however recommend anything like mouse cursors or build/action panels to be placed on one or two canvas'. You can also script to move the position of the elements if you wished to have everything on one canvas but I imagine that would get messy with 100 objects.

avatar image deprofundiis · Jan 26, 2015 at 04:40 PM 0
Share

Thanks for taking the time to answer this @stevecus. Indeed the UI elements are related to each object (they are context action buttons like INFO, USE, GRAB). My question also goes a bit further to try and understand if my decision will have an actual impact on the overall performance.

avatar image stevecus · Jan 26, 2015 at 05:48 PM 2
Share

As far as I am aware with what i've read and used, the canvas uses very little but I can't comment on certain devices, especially as I imagine all your UI will not be showing at once but rather enabling/disabling you should be ok. From some of the tests people have done and posted on the forums having seperate canvases is a better method as you can use culling where, but there are tests with a canvas with around 100-300 UI elements before they had framerate drop. I've been using it in a RTS with each unit/building having a canvas and not had any problems. As someone once told me, "Make it work then worry about making it better"

avatar image deprofundiis · Jan 26, 2015 at 05:52 PM 0
Share

Awesome @stevecus! Thanks a lot for your time. Much appreciated!

0 Replies

· Add your reply
  • Sort: 

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

20 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

Related Questions

Unity UI not showing some Images 0 Answers

Clamping ScrollRect to Dynamically Created Content 1 Answer

getting mip mapping to work on sprites 0 Answers

UI Button and character actions 1 Answer

Antialiasing As Post Effect Blurring UI Text 0 Answers


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