神秘入侵者 发表于 2013-2-1 00:38

国外NGUI与EZGUI对比评测

The following post might be helpful for those standing on the crossroad which GUI framework to go with in Unity project. Among lots of more or less advanced 3rd party options there are just two which can be seriously considered: EZGUI and NGUI. I’ll clarify major differences I’ve noticed in my experience working with both of them.EZGUI and NGUI provide great features for making in-game UI easily and efficiently. However they use different implementation approaches. EZGUI comprises lots of instruments and controls with plenty amount of settings, so you can tweak almost every parameter of any UI element. In opposite, NGUI provides lots of small components and I like its minimalism, short, clean and understandable code. Both EZGUI and NGUI target “1 draw call for UI” and they’ve got very close. Of course “one-draw call for UI” isn’t the main concern, but why not to have such a great addition to your well-structured and optimized code.The following table contains a comparison of both frameworks with features I find important:

Pixel perfectScale of controls is adjusted automatically once on a scene start. Note: it has issues losing render camera reference when instancing UI as a prefabScale of controls is adjusted automatically every time resolution changes. Also has ability to apply half-pixel-offset
WYSIWYGGenerates ordinary gameobject with geometry, so everything is visualized by Unity itselfUses several ways of visualization: “geometry” and “gizmos”, since all UI elements are a part of a single mesh
Access from codeMethods from a specific controller-script are linked with control events.There can be some issues with instancing objects and losing references. Another way –using delegates can be more convenient in some casesSimilar as EZGUI, but here you have helper components, such as UIButtonMessage, which send specified message to a gameobject (or to itself, if target is null), on selected type of interaction. Also you can access to last used control through static variables such as UICamera.lastHit or UICheckbox.current
Ease of controls creationEmpty GameObject is created and attached with necessary componentsProvides handy wizards for creating all kind of controls.
Workflow speedSmooth, but slow. Searching scripts which aren’t included in common menus, adjusting tons of settings, fixing broken atlases and lost camera references (most likely I’m not the only one who experienced these issues)Supersonic! Just a little slowdown when creating atlases for sprites in the beginning, and then pure enjoyment of future process!
Drag and DropBoth frameworks have this feature. Just a little note: any object in NGUI with a collider can be draggable
Atlases creationAtlas has to be recreated every time you want to add/change an image in it. EZGUI can scan all objects, even in a project folder, find allusing the same material and then regenerate the atlas. This process takes lots of time and you should be very accurate not to break somethingAtlas can be managed in two ways: either using fast and handy Atlas Maker to add, delete or modify images in atlas or managing sprites in atlas already created via Atlas prefab inspector
Panels switchingMaking menus with switching panels has never been easier dueEZGUI’s powerful abilitiesPanels can be switched easily as well, but some additional scripting is required. Panels can be switched through animations and helper components, but I haven’t found any direct way to enable one and disable another panel
Additional stuffSince EZGUI is based on Sprite Manager, classes (e.g. Sprite etc.) can be quite useful in 2D games for environment creation, backgrounds etc.Sprites can be used, however with some restrictions like any control must have a parent like panel or UIRoot.
And here is a comparison by controls implemented in the frameworks.
Control
Labelhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Spritehttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Sliced spritehttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Tiled spritehttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Filled spritehttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Simple buttonhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Image buttonhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Toggle buttonhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.png
Radio buttonhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Checkboxhttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Progress barhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Sliderhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Inputhttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
DropDown listhttp://blog.heyworks.com/wp-content/uploads/2012/05/check_no.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
Scrollable listshttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/ok.png
I was really excited with Sliced Sprite from NGUI. When there is an objective to create a resizable window that should be pixel-perfect in different sizes, have a frame outside of it and be filled with a pattern - that’s exactly when Sliced Sprite can manage everything, just specify areas on texture to be used as a frame, corners and filling.Tiled Sprite can be implemented manually with EZGUI, however it won’t be so easy. Tiled sprite always stays pixel-perfect, and it tiles the texture you’re using when scaling. That’s very handy for creating backgrounds for example.NGUI extends Unity with a bunch of useful hotkeys which are really nice-to-have, e.g. Ctrl+Shift+N to add new empty GameObject as a child to selected one, hotkey for toggling gameobject’s activity, handy buttons for resetting transform’s position, rotation and scale.Both frameworks are provided with detailed documentation describing every script, every component, property or method. Additionally, NGUI is shipped with a lot of step-by-step tutorials, video and write-up lessons for beginners.EZGUI is based on Sprite Manager 2 (developed by Above and Beyond Software). SM2 provides features for creating 3D mesh sprites, customizing and changing their parameters in runtime, as well as creating texture atlases, so that all sprites in a scene are a part of single batch and are drawn in one draw call.And here’s my subjective comparison of these both frameworks:


Usabilityhttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.png
Functionalityhttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.png
Flexibilityhttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.png
Reliabilityhttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star_gray.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.png
Extensibilityhttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.pnghttp://blog.heyworks.com/wp-content/uploads/2012/05/star-rating-full.png
…that means I like NGUI much more, however I haven’t described another very important difference between NGUI and EZGUI - the way of working with them. I’ll demonstrate it in my next post, stay tuned.

米斯兰达 发表于 2013-2-1 16:41

总而言之一句话 N适合复杂的 而EZ适合表现效果

神秘入侵者 发表于 2013-2-1 21:18

米斯兰达 发表于 2013-2-1 16:41 static/image/common/back.gif
总而言之一句话 N适合复杂的 而EZ适合表现效果

不知U3D什么时候出 自己的GUI系统期待ing

米斯兰达 发表于 2013-2-2 10:48

神秘入侵者 发表于 2013-2-1 21:18 static/image/common/back.gif
不知U3D什么时候出 自己的GUI系统期待ing

unity出自己的GUI系统的可能性不太大 因为unity作为一款游戏引擎 它在面向用户时 总是希望提供最基本的东西 而不是应用层的东西 那样会限制程序的多样性 也限制了用户的发挥

kukupapa 发表于 2013-2-15 23:22

ezgui正在用。 向往内置的新gui系统

过路者 发表于 2014-5-27 10:23

这是一个什么情况

349061667 发表于 2017-2-21 15:42

楼主是超人

cbm010 发表于 2017-2-21 14:46

顶顶多好

mydesire1218 发表于 2017-2-21 15:19

真心顶

上海-双喜 发表于 2017-2-21 14:46

不错不错
页: [1]
查看完整版本: 国外NGUI与EZGUI对比评测