纳金网

标题: NGUI v3.0.0 最新版 [打印本页]

作者: carronailo    时间: 2013-9-29 15:35
标题: NGUI v3.0.0 最新版
*** WARNING ***
PLEASE BACK UP YOUR PROJECT BEFORE UPDATING!
3.0.0 is a major changeset. You will need to open and re-save all of your scenes and prefabs after updating!
After updating, it is HIGHLY likely that your project will no longer compile as-is. All event delegates have been replaced with an inspector-based system, and transform scale is no longer used on widgets. Check the built-in examples and code to see what should be done instead. There will be a detailed upgrade guide later.

3.0.0:
- NEW: Changed the way widgets get batched, properly fixing all remaining Z/depth issues.
- NEW: Draw calls are now automatically split up as needed (no more sandwiching issues!)
- NEW: Re-designed the way widget width & height gets specified. The values are now explicit, and scale is no longer used.
- NEW: NGUI will now automatically replace UITextures with Sprites when they get added to an atlas.
- NEW: It's now possible to have clipped panels in 3D and not have them break when tilting the camera.
- NEW: It's now possible to nest widgets.
- NEW: It's now possible to have multiple widgets on the same object.
- NEW: It's now possible to change the selection handles color via the NGUI menu.
- NEW: UICheckbox is now a UIToggle, and you now specify a 'group' ID rather than a common root object.
- NEW: Added TweenWidth and TweenHeight to tween widgets width and height properties.
- NEW: You can now specify the label overflow method: shrink content, clamp content, resize height, or resize freely.
- NEW: When labels are in "resize label" overflow mode, the drag handles will be greyed out.
- NEW: Added a simple EventDelegate class and improved all generic components to use it.
- NEW: Added a Widget Container class that can be used to easily select and move groups of widgets (think: buttons, windows).
- NEW: Added the RealTime helper class that removed IgnoreTimeScale. Usage: RealTime.time, RealTime.deltaTime.
- NEW: Improved the inspector look of just about every component.
- NEW: UIPanel now shows a list of all of its draw calls and the widgets causing them.
- NEW: Added a way to auto-normalize the depth hierarchy from the NGUI menu.
- NEW: Sprite selection window now shows sprite names as well.
- NEW: Atlas maker will now automatically sort the sprites, saving them in an alphabetical order.
- FIX: CTRL+ and CTRL- now adjust all widgets under the selected object.
- FIX: Labels will now again align vertically properly.
- FIX: Atlas maker will now respect textures that were imported with a non-native size.
- FIX: Atlas maker will no longer change so many import settings on source textures.
- FIX: Make Pixel Perfect is now undoable.
- FIX: You can once again rename sprites in the atlas.
- DEL: Removed the long-ago deprecated UISlicedSprite, UITiledSprite, and UIFilledSprite classes and some other legacy code.

Event Delegates Upgrading Tips

Subscribe to built-in event delegates (like input change, tweens finishing, slider change, button click, etc) like so:

EventDelegate.Add(slider.onChange, MySliderChange);
...where MySliderChange can be:

public void MySliderChange(){    Debug.Log(UISlider.current.value);}
However (!!!) -- you can now set the same value in inspector instead of code, if you like. Just drag & drop the game object, then choose the "MySliderChange" function from the drop-down list. No need to code it anymore. Just make sure the function is of type "void (void)", and is public.

Widget Size/Scale Upgrading Tips

Widgets no longer use their transform's scale at all. You can now use widget.width and widget.height instead. If you need to know world-space corners, just use widget.worldCorners. Local space corners --widget.localCorners. There is also widget.innerCorners if you need it.

Other Upgrading Tips

* Open each scene in your project, then save them. Make sure to enable all of your game objects, as the upgrade logic only kicks in once the widgets are enabled.
* Drag in your widget-using prefabs into the scene (so they show up), then apply the changes so that the prefabs also get upgraded.
* Globally replace "UICheckbox" with "UIToggle".
* UICheckbox no longer has a 'root', so go through your radio buttons and give them a group ID instead.
* "Make Pixel Perfect" button is now just called "Correct", beside the widget's dimensions.

NGUI v.3.0.0.rar

10.88 MB, 下载次数: 18

NGUI 3.0 最新版


作者: animan    时间: 2013-10-1 10:01
很棒的插件,谢谢分享。。。。。。




欢迎光临 纳金网 (http://course.narkii.com/club/) Powered by Discuz! X2.5