Author Topic: New NGUI user question  (Read 2055 times)

Winterra

  • Guest
New NGUI user question
« on: July 08, 2013, 01:16:14 PM »
Hello NGUI users!

I'm a new user to NGUI and having to learn as much as quickly as possible for a professional project. While I have tried to read as much documentation as possible I have a few questions still outstanding which are more generalist and best practise  rather than any specific singular issue. I'm a games artist so my technical skills are not as refined as they could be and the WYSIWYG aspects of NGUI are going to be a big help.

1) How do you set up a project to work across a variety of tablet sizes? I can find plenty of references to doing things at a static size but I will be working on a single project to broach a wide variety of devices sizes (mobile).

2) When would you consider the best time to create a prefab instead of just having a lose game object and can you contain prefabs within prefabs?

3) The general debugging information seems really minimal. Is there a plug-in which can help with this?

4) Does NGUI have touch gesture controls? I can find various mouse related ones but none that relate to gestures such as tap / pinch / drag.  The intended use for this would be to swipe though a carousel.

5) Do all the UI assets get added into a single atlas for that resolution density? or can these get broken down into smaller atlases and still be able to swap atlases based when required for various devices. It might be easier to have all the assets in a single atlas but performance wise that would not be to great surely.

6) Does NGUI have a basic script for loading / Navigation to a new scene.

7) Is it best to group and align widgets within a blank game object? and it is possible to get a widget to have its size based of a % of that parent game object? Previously I tried to placed a widget centred on a panel and then anchor that whole panel and its contents to the left of the page. This sadly didn't work out for me.


Thank you very much for your responses It really does help. At the moment I'm still trying to work out the best practice for building a single GUI that can work across various devices and densities. Its never fun when Android get added to the list.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: New NGUI user question
« Reply #1 on: July 08, 2013, 11:15:09 PM »
1. For mobiles it's generally best to stick with "fixed size" option on the UIRoot for Android devices, as there are simply too many of them to do anything else.

2. No, prefabs within prefabs are not supported by Unity. I wouldn't create a prefab out of UI until I'm done with it, and I would only do it if the UI needs to be present in more than one place.

3. Debugging of what? You can see what the mouse is hovering over by enabling debugging on the UICamera for example.

4. No gesture controls. NGUI is a UI kit. Gestures would be a completely different scope. Many use another well-known plugin for that alongside NGUI.

5. You can break things up into multiple atlases, but doing so will result in more draw calls. It's best to keep one atlas.

6. LoadLevelOnClick

7. % of parent object -- no. Parent object must have a scale of (1, 1, 1). % of another widget -- yes using UIStretch. Best to limit the usage of UIStretch however. Performance reasons.

Winterra

  • Guest
Re: New NGUI user question
« Reply #2 on: July 09, 2013, 06:20:54 AM »
Excellent!

Many Thanks ArenMook. This will be a big help to me. No doubt I'll be back with more questions as I learn more.

Thank you once again.