To get a preview of a sprite in the atlas maker, just click on its name.Sometimes, It's hard to click on one by one to find an image.
Improvements to UILocalize as:In my view, the UILocalize, has been sidelined in the latest updates.
- Native support to CSV file
- Letting you select an item from the translation file using a dropdown, in UILocalize component.
---------------------
- Allow create grandient color (first and last color) components.
- More rich text content in labels
Pro version of NGUI already allows you to create gradients on labels, and I've considered doing that for sprites as well. Perhaps I should? Preview of localization data in inspector a good idea. Most people don't even think about the localization system. I haven't given it much thought in a while.I like NGUI Localization, easy to use and very well integrated. One more point that makes me not using it is the lack of support to a CSV (so I could keep two or more languages in a single file) and GoogleDocs (but GDocs support is not required, but it is only a facility.)
Data binding has already been prototyped, and the Pro version has some testing code in it that has the framework for it. I'm still not entirely sure I understand what's the best use case for it. I use it to be able to set both properties and values of a remote script by name -- which, while cool, seems like a strange way of going about it, since I can just do a GetComponent and set the value directly. I can think of a couple semi-useful use cases, but I'd like to hear what you guys would use it for?Data binding is very useful to totally separate UI logic and UI appearance. Your UI code will not relay at all on the hierarchy of UIWidgets, they are separated. For example with data binding if you expose a bool like MyLogicIsValid, you can change totally your UI without a line of code, for example changing the appearance of a button to look disabled/enabled, display a string that tell the user that something is not valid and even play an animation on value switch. Another example, if in my UI logic there is a list of 100 items exposed, I can choose to show them 10 by 10 in a scroll panel, then I can add a preview for the selected one without changing any code; I can even change what I show for each item, as far the properties are exposed, and how, if for example there is a string property, I can show a UILabel or a UISprite.
Most of what I gather from this thread is this: NGUI is a powerful tool, but I suck at creating non-programmer documentation. :)
Why are there no prefabs for those controls using a builtin atlas?There are prefabs for all basic GUI elements uGUI using a default (built-in) atlas. Come to think of it... I don't know why I never added them to NGUI. I really should.
So my request is to see if we can make sure that we can maintain some sort of ability to download updates without waiting for new Unity versions.
I'm thinking of adding help buttons to components and linking them to posts here, where users can always ask questions related to the topic directly.Oh well.
One more thing I'd like to add - Is to make NGUI code follow the O in SOLID - Open for extension and closed for modification. Sometimes I need to create a custom type of UIInput, some of the stuff is private - why not make them protected? - I have to come in and edit your code - 'open it to modify it' - to be able to extend it.
Just a thing to keep in mind.
Thanks.
If you guys want me to make certain things public / protected, just ask. Another user has done exactly that yesterday, and the functionality he has requested can be already found exposed in 3.0.6.
Anchoring / stretch system is scheduled for a re-design in 3.0.7.
One thing that I seem to often stumble into:
There's no easy way to flip a sprite (both horizontally or vertically). This can become annoying if you have a single texture for a corner piece that's identical in all corners, because you either have to mess around with setting scale to -1 on a parent or rotating each piece.
Rotating is not the same as mirroring, so that doesn't always solve that problem. Would be nice with two simple:
[ ] flip vertically
[ ] flip horizontally
on each widget.
Better layouting (is that even a word?) support and snapping for widget positioning is the main feature for 3.0.7.
3.0.6 has been the biggest update yet, feature-wise. The downside of making improvements is now I have to make some new videos to go with them!
As others have pointed out many times... NGUI is an uber powerful tool -- but learning it can be a challenge. So my main focus with NGUI 3 updates is to make it as easy to use as possible and to remove as much "wtf?" from it as I can.
I try to make my UI "pretty", so I try to add tweens and fades wherever possible.
I'd really like to see some improvements in widget alpha nesting.
If I want to fade out a button, I'd have to tween both label and background sprite manually in the button script. What if the label is 50% transparent by default, I'd have to keep this default alpha value somewhere and use it in in the final button alpha calculation.. What if button's alpha is set to 0.25 to hide it, but another script changes the labels alpha to 1?
I know you've added panel alpha nesting, and that's a great feature! But I can't add every nested widget in it's separate panel, so some improvements in this domain would be really welcome!
Nerophon: Masking with clipping can be doe by changing the shader used for the UITexture. See http://nickithansen.dk/masking-and-clipping-textures-using-shaders-in-ngui/
The idea is to use the existing onCustomInput delegate function but call it *before* processing mouse inputs so we can tell NGUI to not process any input by returning false.
...
Note: this basically only moves the onCustomInput call earlier in the function and bail out if the callback returns false (currently the delegate returns void).
Not sure what you mean, gyd.
Words like 'Class', 'Function' and 'Enumerations' don't mean much (or anything) to a lot of people who are likely to use NGUI in an attempt to avoid programming all this stuff for themselves.
Anchor script can be used for several purposes, all of which are also covered in Example 0.
- It can make widgets appear pixel-perfect on Windows machines by applying a half-pixel offset (works only for widgets parented to the anchor).
- If placed on an object it can be used to anchor that object to the side or corner of the screen.
Parameters / Tips
[...]
While more detailed documentation is always nice, I disagree that anything in this example should be explained in the NGUI docs. Knowing what a method, class or a coroutine is is an extremely basic knowlenge fundamental to practically any developer using Unity, and it should be learned/covered through official Unity docs and tutorials (or even through general-purpose docs on C# or programming in general), not re-explained by every plugin author. Doing so would be like having a racing game explain to the players what a wheel is. :)
4 - Active/Desactive Component
1 - Revamp Localize(http://imageshack.us/a/img819/756/xc1z.png)(http://imageshack.us/a/img689/5479/mnvw.png)
4 - Active/Desactive Component(http://imageshack.us/a/img809/6250/1u00.png)
1. The ability to drag objects out of a scrolling table.http://www.youtube.com/watch?v=B66xhIvYF00&feature=c4-overview&list=UUQGZdUwzE8gmvgjomZSNFJg, around 32:40 mark I make it possible to drag & drop items out of a scroll view.
...maybe its already there? Wasn't the last time I looked. Would be great if it is.
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.
How about using 2D colliders and Physics2D.OverlapPoint instead BoxCollider and Physics.Raycast for mouse events? I know 4.3 is relatively new but that adjustment would be more convenient and faster (for overlapping colliders it could prioritize Z from transform, then layer of the panel and then sorting order of the widget attached)I can't use 2D physics because:
Also it would be good if Unity 2D layers/sorting orders were going in par with NGUI's panels and depth (eg: I have animations done with vanilla unity Sprites and positioning them in hierarchy of NGUI elements is hard withoutconverting each Sprite to NGUI's 2D Sprite orusing shaders)
*edit: you cannot animate NGUI's 2D sprite component
First of all, I really like NGUI, and I appreciate all of your continued effort to make it more user friendly.I avoid using default values in function declarations. Which functions don't compile in monodevelop? If you tell me what they are, I can fix them. I use Visual Studio myself.
All NGUI files should be able to compile inside of MonoDevelop. Things like default parameters in C# typically do not compile in Mono, even though they compile in Unity. I always test by building in Mono first to track down obvious errors and warnings, but now, I have to make sure to close NGUI files because some of them have errors.
I would like for most functions to become protected by default. I create classes that inherit from NGUI classes to keep from losing my changes when upgrading to the latest versions. This forces me to manually change some NGUI functions to be protected instead of private. For instance, I have to make UIInput's Start function protected. Then the inherited class makes a "new void Start()" and calls base.Start();
It would be nice if the only times I had to modify my inherited classes were to account for a renamed class (like what I had to do with UIDragScrollView). For that class (and others) I need to add an OnHover function to keep my game's camera from responding to the scroll wheel.
I very much like using TweenPosition and other tweens.That's a bug. I will fix, thanks!
What I don't like is the fact that whenever I add the component to an object, it's position resets to 0,0,0.
I wish it would stay the same.
Thanks
As for animating the 2D sprite: you can. Animate the 'nextSprite' variable.
http://www.youtube.com/watch?v=B66xhIvYF00&feature=c4-overview&list=UUQGZdUwzE8gmvgjomZSNFJg, around 32:40 mark I make it possible to drag & drop items out of a scroll view.
Hello Michael,Random thought just hit me.... this is already possible. You just need to use stencils. I'll see about adding a tutorial on this in the near future.
I wish an improved UIpanel script that allow the user to nest a clipped panel in an other one, like a scroll view inside an other scroll view...
Cheers,
Hlx
All NGUI files should be able to compile inside of MonoDevelop. Things like default parameters in C# typically do not compile in Mono, even though they compile in Unity. I always test by building in Mono first to track down obvious errors and warnings, but now, I have to make sure to close NGUI files because some of them have errors.
- NEW: Enabling/disabling widgets no longer affects other panels.
... this is already possible. You just need to use stencils. I'll see about adding a tutorial on this in the near future.
Random thought just hit me.... this is already possible. You just need to use stencils. I'll see about adding a tutorial on this in the near future.
I avoid using default values in function declarations. Which functions don't compile in monodevelop? If you tell me what they are, I can fix them. I use Visual Studio myself.
Unity 2D's atlassing system is completely useless in 4.3 as it's not available to be used properly by scripters.
Unity 4.5 is when it will finally be usable.
please please please please change your private variable to protected!
E.G.: i can't extend the label to add custom effects because all instance variable are private! so i have to duplicate code and update it by myself when a new release is out.
thank you!
You can already have bold, italic, underline, strike-through as well as sup/subscript. Check the UILabel documentation.
Motion is a very important part of UIs for me, having the ability to define a group of tweens such as transition in / out and being able to call them would be a great core feature.
@Asmolicious: UIButton.current tells you what called the On Click function. No need to have many functions. Same with toggle (UIToggle.current), input (UIInput.current), camera (UICamera.current), etc. All NGUI classes are set up the same way. The 'current' value is set right before a callback.
Yes, but what would set those parameters, exactly? Events are generic. They don't know anything about your buttons or where they come from.
You could simply name your buttons properly. Or attach a data script:
using UnityEngine; public class MyButtonData : MonoBehaviour { public int buttonIndex = 0; public string someCustomValue = "abc"; }
...then all you need to access it in your OnClick callback is:
MyButtonData data = UIButton.current.GetComponent<MyButtonData>(); Debug.Log("Clicked on button " + data.buttonIndex + " with value of " + data.someCustomValue);
@LaeusPF: You could also technically just hit escape to clear the selection from the widget then you can move around freely. RMB being disabled was in part intentional because panning around the UI is rarely something desired. Game objects, certainly... but UI, not so much.
@Hawkins: CVS is a versioning system. I assume you meant CSV, comma separated value file. Yes, it's certainly on the list, and your suggestion was excellent.
Can't we set depth on the panel now? Seems to completely take care of this for me.
2. Another thing is duplicating objects. For some reason when I duplicate objects the position and scale always get messed up. Its always slightly less then the previous object. I don't seem to notice this duplicating non NGUI objects. I know that now we use the widgets size but the position is still always off by .0001 or something and my OCD kicks in and I must fix it and the scale..
Add "Set as Current" button on Tween*s' inspector please
You can already do that, checkout the options in the gear menu on any of the tween scripts. It should probably be mentioned in the documentation. I only learned about it through watching the video tutorials.
UIStretch is a deprecated component, Dover8. The new layout system replaces its functionality, and all widgets have an aspect ratio you can set.
I would greatly like multi monitor support. Right now the anchor system really only works for one monitor. It would also be great to have moveable "dockable" GUI zones for customizing your in-game GUI interface.
UIStretch is a deprecated component, Dover8. The new layout system replaces its functionality, and all widgets have an aspect ratio you can set.
It's NOT the same:You can move an anchored widget quite easily:
- With UIStretch you can stretch both sides BUT you can MOVE freely your sprite.
- With the new anchor system it forces the position and you can't move it (try unified with left 0, right 0, top 0, bottom 0 to panel or uiroot).
You can move an anchored widget quite easily:
NGUIMath.MoveWidget(widgetOrPanel, X, Y);
You can move an anchored widget quite easily:
NGUIMath.MoveWidget(widgetOrPanel, X, Y);
A plain window game object wouldn't be anchorable using the new layout system as it's not a widget or a panel, so the question becomes moot, as you then simply adjust the transform's localPosition.