Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Macro · Aug 08, 2012 at 08:36 PM · ngui

NGUI each UI has camera?

Sorry if this is a stupid question, but im a bit confused as to why NGUI has its own camera for each UI that it has.

In my scene I have a first person controller with the main camera, so are the other cameras just used to see your UI as your are developing it or is there some magic I am unaware of which uses the cameras when rendering the UI?

Comment
Add comment
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

1 Reply

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

Answer by ScroodgeM · Aug 08, 2012 at 08:40 PM

camera lets you use GPU to draw anything. using separated camera, combined single mesh and simple material for all GUI will draw in one drawcall, that is very-very cheap for GUI. so the best way to draw GUI is exactly camera and good-combined mesh, what NGUI do.

Comment
Add comment · Show 4 · 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 Macro · Aug 08, 2012 at 08:42 PM 0
Share

so does it use the camera to draw its GUI then it just overlays it on the mainCamera or something?

avatar image ScroodgeM · Aug 08, 2012 at 08:59 PM 0
Share

correct. and it's very simple operation for GPU.

avatar image Macro · Aug 08, 2012 at 09:19 PM 0
Share

How does this work with 3d UI elements then, as surely they are drawn based on their 3d position based on the main camera. I am just trying to get my head around how to position a 3d tooltip using NGUI above a game object, so should I be positioning the UI above this element (using the gui and the main camera) or do I need to somehow use the camera attached to the gui element and somehow position that the inverse of the game object position to simulate it being above it... There just seems to be little information on this, and although I do appreciate your answers, they are quite short on the "how", although you do explain the "why"

avatar image ScroodgeM · Aug 08, 2012 at 09:32 PM 0
Share

actual and almost full information better to search at developer's sites 8)

http://www.tasharen.com/?page_id=197

if you need something explained - just ask.

about 3d above objects. you can position you NGUI camera to same position as main and place GUI elements directly at point of GameObject's position. it will looks exactly as you whant.

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

8 People are following this question.

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

Related Questions

Problems With NGUI on MAC 1 Answer

NGUI Button 1 Answer

NGUI - move label in absolute pixels 0 Answers

NGUI Health SendMessage Has No Receiver 1 Answer

NGUI(UIDraggablePanel) : Determine if user has scrolled to end of table 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