Author Topic: (!!!) Improving NGUI: Voice your opinion  (Read 145558 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
(!!!) Improving NGUI: Voice your opinion
« on: November 13, 2013, 05:15:44 AM »
As some of you may know, I created NGUI 2 years ago for myself because I needed a UI system. Since then it has grown and evolved over the first year, but then I joined Unity and the development slowed down. That was in part because of my contract with Unity which allowed for only minor changes to NGUI, and in part because I was too busy with support and the new full-time job at Unity.

This is now changing, and as many of you also know, a new UI that I've been contributing to at Unity is coming soon... but it's still based off of NGUI, and my view of what's important is biased because of that. And so I turn to you, the users. What's important to you? What would you like to see in both NGUI and/or Unity's GUI?

Some mentioned contextual menus in the editor. I've done a first pass on that recently by adding a way to right-click on widgets in order to show the hierarchy of what's underneath. Do you want to see more options there, or do you worry that it will be cluttered and unusable? An example would be the ability to create widgets from the context menu, add child objects, attach common components... To me that seems redundant since NGUI has hotkeys for that (ALT+SHIFT+S to add a sprite, ALT+SHIFT+L to add a label, T for texture, C for collider, etc). What do you think?

Also, which areas do you want improved / redesigned? The anchor / stretch system redesign is already on the roadmap. More intuitive way of specifying clipped regions is as well, and will come before the anchor/stretch system. What else? I know the lego-like structure of NGUI's widgets does not appeal to everyone and some find it complicated (checkbox being several game objects / components for example), while others like the fact that it's flexible and offers a way to customize their UI without modifying code. What about you?

More importantly still... what frustrates you in NGUI? What makes you go "AAAARRRGHGHHHH!!"? I myself tend to rage quite a bit IRL (mainly related to Mecanim lately... ugh!), so I am quite guilty of hating the system because I don't understand it. So if something is driving you nuts and you want it changed / explained, feel free to vent here and I will do my best to do something about it.

So, in short -- I want to improve both NGUI and uGUI, and your opinions can do just that. :)

zasadnyy

  • Guest
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #1 on: November 13, 2013, 05:43:08 AM »
Hello,

One thing that frustrates me - is how pixel perfect / fixed mode on UIRoot works, before game dev I was an android developer, and their approach of specifying dimensions in dip's (destiny independent pixels) is much more easier to understand and work with, as for me this could be cool improvement (or as an option, maybe some tutorial with best practices how to make ui for different resolutions). Also together with previous idea it would be nice to have automatic atlas switching (for different resolutions) out of the box.

According things you've mentioned, as for me - contextual menus in editor are overhead, shortcuts are more comfortable to work with, lego structure of components - is not a problem at all.

p.s. can't wait for improved clipping system:)

Skjalg

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #2 on: November 13, 2013, 09:09:29 AM »
First of all, I think you're selling yourself short on the development slow down. I think you have prioritized fixing some of your early mistakes and that has benefited all your users. (Not being able to nest was my biggest gripe with NGUI before).

Right now I feel like I can do most things with NGUI, except optimize it for all my use cases. I'm not sure what the anchor / stretch system redesign will entail but I hope it will focus on getting rid of the reliance on Update methods. There shouldn't be any reason for GUI to update every frame unless it is tweened. UIGrid should be updated to the standards of the other widgets - It should contain pivot, size and reverse direction. Kind of like a label in that regard.

Recently used Assets (for selecting atlas and font) is just tedious to work with, because I don't trust it. It is not always updated and so I don't want things to break so I manually find them myself instead. Theres a little circle to the right of an Object field, but for some weird reason this doesn't work. Make that work instead of having to rely on a custom editor to locate your assets.

I think NGUI options should move over to Edit/Preferences and then have an NGUI tab there. It would be handy to be able to toggle features on and off etc.
http://docs.unity3d.com/Documentation/ScriptReference/PreferenceItem.html

The Atlas Maker needs an overhaul. Or maybe you can just support the new sprite system that came with the 2D update? Anyways, right now theres several issues with how it works. The "Save/Update Atlas" button should be the only button that updates the atlas. Creating a new atlas should prompt you with a save dialog instead of creating the atlas in what seems like a random folder. Adding textures to your atlas should be done with drag and drop from the Project View (or context menu). But the atlas should not be updated until you press save/update. You should also be able to see the textures in the atlas maker, like you do when you select a sprite. Deleting textures from the atlas should happen when you press the x, but it shouldn't be updated to the atlas until you press save/update.

It would be handy to have a some more context menus in the Project. Like when I have selected a textAsset and TextureAsset I should get the option to Create->Font which launches the font maker. Also when you select a texture and right click you should be able to add to -> and then get a list of all atlases in your Project. This would then open the Atlas Maker.

I also feel like how to support different resolution sizes could be made smoother. It makes sense that I have to create a font that I call "Header Font" which is a reference to "Header Font SD" and "Header Font HD", but right now the references can quickly become many and its not easy to maintain which is which.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #3 on: November 13, 2013, 09:13:53 AM »
With regards to opportunities, we would like to see a lot of that is in the Flex in Flash (eg layout system) :)

sisso

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 46
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #4 on: November 13, 2013, 12:02:40 PM »
I personally think that NGUI is still developing fast and I am very happy with the tool.

If you really is need something to work (hehe). The only difficult that I have today (wilth simples workarounds) are merge game inputs with ngui inputs (sometimes I need a isHot method or GetAllTouches()), allow a better integration with 3d models, to use in drag panels for example (today I use fake sprites :P).

ant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #5 on: November 13, 2013, 12:35:07 PM »
Ability to use 3D assets (models) to build UI then embed into NGUI's containers.
Creating 3D UI fails because lacking of depth-peeling (Order of Transparency) support.
Could NGUI do something as a workaround?

Quarkism

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #6 on: November 13, 2013, 01:33:31 PM »
Easy Conversion to the new UI. I would appreciate it if you slowly start moving us to the new programming model so that when the time comes to switch most / all of the work can already be done to convert my project over. For instance with Unity 4.3 released a version of NGUI that utilized the new 2d sprite system would be nice.

A second (lesser) point would be a reactive layout system. Reactive layouts are wildly used in web program (see Bootstrap as an example) to have a single UI render differently depending on the screen size. For the most part row cells stack horizontally when the screen is large.. and collapse into a vertical arrangement when the screen is small. Such a system would be very beneficial to unity as it is (like the web) cross platform.

A third (lesser) point would be to html rendering.
« Last Edit: November 13, 2013, 01:48:59 PM by Quarkism »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #7 on: November 13, 2013, 03:03:55 PM »
Tool that does conversion to the upcoming UI system is pretty much a guaranteed feature at this point. I've done two prototypes now with various degrees of success. One doing the changes directly by converting all existing sprites to a new system, and another tool that saves the entire UI into a text format that it can also be read from. There are two unresolved issues at this point. First is that Unity doesn't seem to expose a way to get the object's GUID, and since scripts and other components are referenced by GUIDs, there is no way to preserve references such as fonts on labels when saving into the text format. Direct conversion makes this easier, but since the new UI system uses UnityEngine.Sprites, and NGUI uses atlases that have no reference to original textures, auto-conversion is somewhat... difficult. There needs to be some place to specify which sprite maps to which texture, basically. These two issues are the main reason why the Pro repository doesn't already have this tool finished for the Unity Alpha users to play with.

Layout system in NGUI is another thing I've already started re-thinking. Unity GUI is already getting a completely different layouting system (no more anchors / stretch scripts, yay!) thanks to one of our devs who had an awesome idea (Rune).

HTML rendering falls into the same category as rich text rendering. Labels have needed a lot of love ever since the dynamic font implementation, and it's definitely something I plan on doing in the near future.

@ant: You can create 3D UIs just fine as long as you separate the elements you want into different draw calls by adding extra UIPanels. For example if you wanted to have one UI element refract another element that's below it, simply draw them using different panels (and make sure the panels have different depth values).

@sisso: Unity's upcoming GUI system comes with an event system that does input handling quite elegantly. I'd still want it to improve a bit and have a way to subscribe to specific events (specific key being pressed) instead of having to poll them using Input.GetKey every frame though... We'll see if I get the time. Keyboard and controller handling / navigation within NGUI is another thing that I've never expanded on as much as I could have and have been meaning to do but never got around to. I did it nicely in uGUI though.

@Skjalg: Unfortunately most of what you mentioned is this way because of Unity. For example, it not being able to see any atlases in the scene when you click on the atlas button and/or the round button to its right. That's Unity being... Unity. Context sensitive menus on project assets is an interesting idea though. I will see if it can be done.

Thanks for the feedback so far guys, keep it coming!

TegTap

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 5
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #8 on: November 13, 2013, 03:54:37 PM »
I love the fact that it's flexible and offers a way to customize their UI without modifying code.  I don't mind a lot of game objects. 

Maybe there's something I'm doing wrong, but it seems that whenever I create a new UI root, the scale is always really small and I can't change it.  Granted, this doesn't affect functionality much since all of the UI is relative to that parent UI root, but I sometimes copy/use elements outside of the UI root hierarchy, so it would be nice to either have that scale default to 1,1,1 or be able to manually change it.  Thanks for maintaining a great product.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #9 on: November 13, 2013, 03:58:11 PM »
UIRoot is always scaled to 2 / height, where height is manual height if it's fixed size, and screen height if it's not. It's done this way so that the UI is not massive on your screen compared to other objects. You can disable UIRoot and you will then be able to scale it, or just set the manual height of UIRoot to 1. Just be prepared to adjust your camera's size from 1 to your target screen height.

gdeglin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 18
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #10 on: November 13, 2013, 03:58:41 PM »
Thanks for all the great work so far! Here are some things that I would really love to see:

1. Sprite dicing - 2D Toolkit has this feature and it's amazing. It cuts your sprites into little pieces (you can specify the size), then removes duplicates and transparent pieces. This results in significantly smaller atlas sizes. It also reconstructs the sprites in the game onto a mesh that doesn't include the areas where the transparent pieces were, thereby significantly reducing overdraw.

2. Parameters in callbacks. - The new callback system is great, but would be even better if it let me specify parameters and values that would get passed to the callback.

3. Anything to reduce memory allocation - Right now NGUI cameras seem to allocate a bit of memory on every frame. Roughly twice as much as regular cameras. Anything to improve this or other areas where memory can be allocated would be really useful.

4. Improved sprite atlas management -- NGUI's atlas maker is very bare bones. Along with dicing (as mentioned in #1), it would be great to see the following features:
A: Per sprite materials
B: Sprite previews in the window
C: Automatic multiple-resolution altas generation

5. Built in support for multiple resolution textures (based on device). The textures should get loaded from resources or an asset bundle so that unused ones don't take up memory.

6. PNG atlas support

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #11 on: November 13, 2013, 04:01:19 PM »
To get a preview of a sprite in the atlas maker, just click on its name.

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #12 on: November 13, 2013, 05:40:20 PM »
I would love to see some more layout focused updates, such as the ability to add margins to an element so when it is put inside a container such as a table, it would not directly but up against the previous element, or the ability to order items.  Our application currently does a lot of non typical game UI layouts with NGUI, its more or less creating web layouts that need to have flowing elements.  UITable/UIGrid somewhat supports this, but we end up positioning a lot of items by hand(math!) to get the desired effects.

motionsmith

  • Guest
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #13 on: November 13, 2013, 06:51:08 PM »
Thanks for asking!

There are some things that are keeping me from upgrading from 2.x to 3.x:

  • No support for HD resolution dynamic font textures (and the alternative, bitmap fonts, no longer support multiple font sizes). Especially problematic when working in "dips" ("Fixed size UIRoot").
  • Dynamic fonts do not look good at sharp angles because their anisotropic setting is not exposed.
  • Kerning and leading cannot be set on dynamic fonts.
  • Major performance drop in UIPanel when setting UITexture.mainTexture.

As for new features:

NGUI needs to make it easier to work in device-independent pixels like Android (dp) and iOS (points) do. This includes the tedium of loading the proper resolution atlases

A layout system. It should make it easier to scale components based on the size of the screen (again, in "dips", not pixels), and support "containers" that scale to the size of their contents.

Additional scroll panel features: 1) A content "offset" padding from the edges of the scroll panel, so that when the content "springs" back, it springs back to a padded offset point, rather than hugging the edge. 2) Support for nested scroll panels, so that a child scroll panel can scroll horizontally inside of a vertically scrolling parent.

Ellipses for truncated labels!!!!

Great work. I appreciate all the hard work and support that you give (I did it for years with the Flash Game Engine, Citrus Engine) so I know how maddening it is.

ikuniojp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: (!!!) Improving NGUI: Voice your opinion
« Reply #14 on: November 13, 2013, 09:40:11 PM »
My company has bought only 3 license and planing to buy more if we can figure out how and why thing works the way they are in NGUI.
I know you do not have time to read so I will keep it in point to point note.
I am still new to NGUI so please be patience if I sound noob.

Need:
1. Panel Manager (Like scenes in build settings but for panel)
2. Better Depth Manager (If possible auto Depth distributor in specific number address by user)

Want:
1. Ability to specify which UISprite to stay on load next scene (Do Not Destroy On Load)
2. Have toggle button still working after hide, (Ability to specify which UISprite to not remove from better list)

Pie in the sky:
1. Auto sort multiple Atlas in folders (automatically copy only the used images, create new folder with atlas name, put all the used resource in that folder).
2. Undo in Atlas, (Sometimes Add new items to atlas still reset the dimensions of the sprite? Ver 3.0.5)
3. Panel Transition, Fade in(out), Zoom in(Out) ETC (Maybe in Panel Manager?)

My 2yen ;)
« Last Edit: November 13, 2013, 09:57:29 PM by kuniojp »