- Home /
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?
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.
so does it use the camera to draw its GUI then it just overlays it on the mainCamera or something?
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"
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
![](https://koobas.hobune.stream/wayback/20220613075404im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
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