找回密码
 立即注册
查看: 5006|回复: 60

[插件] 国外NGUI与EZGUI对比评测

[复制链接]
发表于 2013-2-1 00:38 | 显示全部楼层 |阅读模式
资源信息 Tutorial Information
教程名称: 国外NGUI与EZGUI对比评测(发帖教程)
适用引擎:   (适用引擎,为空默认为Unity)
教程语种: 中文
教程等级: 1
教程格式: 图文(请用IE9以上浏览器访问本版块)
教程作者: 转载自互联网 (如有问题请短消息联系作者或发表回复)
下载地址: (兑换积分)
点击查看原图
美丽分割线
[size=1.2em]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.
[size=1.2em]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.
[size=1.2em]The following table contains a comparison of both frameworks with features I find important:
[size=1.2em]
[size=1.2em]
[size=1.2em]Pixel perfect
[size=1.2em]Scale of controls is adjusted automatically once on a scene start. Note: it has issues losing render camera reference when instancing UI as a prefab
[size=1.2em]Scale of controls is adjusted automatically every time resolution changes. Also has ability to apply half-pixel-offset
[size=1.2em]WYSIWYG
[size=1.2em]Generates ordinary gameobject with geometry, so everything is visualized by Unity itself
[size=1.2em]Uses several ways of visualization: “geometry” and “gizmos”, since all UI elements are a part of a single mesh
[size=1.2em]Access from code
[size=1.2em]Methods from a specific controller-script are linked with control events.
[size=1.2em]There can be some issues with instancing objects and losing references. Another way –using delegates can be more convenient in some cases
[size=1.2em]Similar 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
[size=1.2em]Ease of controls creation
[size=1.2em]Empty GameObject is created and attached with necessary components
[size=1.2em]Provides handy wizards for creating all kind of controls.
[size=1.2em]Workflow speed
[size=1.2em]Smooth, 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)
[size=1.2em]Supersonic! Just a little slowdown when creating atlases for sprites in the beginning, and then pure enjoyment of future process!
[size=1.2em]Drag and Drop
[size=1.2em]Both frameworks have this feature. Just a little note: any object in NGUI with a collider can be draggable
[size=1.2em]Atlases creation
[size=1.2em]Atlas 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 all  using the same material and then regenerate the atlas. This process takes lots of time and you should be very accurate not to break something
[size=1.2em]Atlas 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
[size=1.2em]Panels switching
[size=1.2em]Making menus with switching panels has never been easier due
[size=1.2em]EZGUI’s powerful abilities
[size=1.2em]Panels 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
[size=1.2em]Additional stuff
[size=1.2em]Since EZGUI is based on Sprite Manager, classes (e.g. Sprite etc.) can be quite useful in 2D games for environment creation, backgrounds etc.
[size=1.2em]Sprites can be used, however with some restrictions like any control must have a parent like panel or UIRoot.
[size=1.2em]And here is a comparison by controls implemented in the frameworks.
[size=1.2em]Control
[size=1.2em]Label
[size=1.2em]Sprite
[size=1.2em]Sliced sprite
[size=1.2em]Tiled sprite
[size=1.2em]Filled sprite
[size=1.2em]Simple button
[size=1.2em]Image button
[size=1.2em]Toggle button
[size=1.2em]Radio button
[size=1.2em]Checkbox
[size=1.2em]Progress bar
[size=1.2em]Slider
[size=1.2em]Input
[size=1.2em]DropDown list
[size=1.2em]Scrollable lists
[size=1.2em]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.
[size=1.2em]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.
[size=1.2em]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.
[size=1.2em]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.
[size=1.2em]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.
[size=1.2em]And here’s my subjective comparison of these both frameworks:

[size=1.2em]
[size=1.2em]
[size=1.2em]Usability
[size=1.2em]
[size=1.2em]
[size=1.2em]Functionality
[size=1.2em]
[size=1.2em]
[size=1.2em]Flexibility
[size=1.2em]
[size=1.2em]
[size=1.2em]Reliability
[size=1.2em]
[size=1.2em]
[size=1.2em]Extensibility
[size=1.2em]
[size=1.2em]
[size=1.2em]…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适合表现效果

点评

不知U3D什么时候出 自己的GUI系统 期待ing  详情 回复 发表于 2013-2-1 21:18
 楼主| 发表于 2013-2-1 21:18 | 显示全部楼层
米斯兰达 发表于 2013-2-1 16:41
总而言之一句话 N适合复杂的 而EZ适合表现效果

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

点评

unity出自己的GUI系统的可能性不太大 因为unity作为一款游戏引擎 它在面向用户时 总是希望提供最基本的东西 而不是应用层的东西 那样会限制程序的多样性 也限制了用户的发挥  详情 回复 发表于 2013-2-2 10:48
发表于 2013-2-2 10:48 | 显示全部楼层
神秘入侵者 发表于 2013-2-1 21:18
不知U3D什么时候出 自己的GUI系统  期待ing

unity出自己的GUI系统的可能性不太大 因为unity作为一款游戏引擎 它在面向用户时 总是希望提供最基本的东西 而不是应用层的东西 那样会限制程序的多样性 也限制了用户的发挥
发表于 2013-2-15 23:22 | 显示全部楼层
ezgui正在用。 向往内置的新gui系统
发表于 2014-5-27 10:23 | 显示全部楼层
这是一个什么情况
发表于 2017-2-21 15:42 | 显示全部楼层
楼主是超人
发表于 2017-2-21 14:46 | 显示全部楼层
顶顶多好
发表于 2017-2-21 15:19 | 显示全部楼层
真心顶
发表于 2017-2-21 14:46 | 显示全部楼层
不错不错
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-11-24 10:12 , Processed in 0.229286 second(s), 32 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表