NGUI中显示DrawCall详细信息
摘要:【NGUI显示DrawCall详细信息】 UIDrawCall中有个宏,SHOW_HIDDEN_OBJECTS,默认为关闭状态。将此宏打开,NGUI即会将DrawCall对象显示在Hierarchy中。如下: 对象的命名规则如下:
阅读全文
UIPanel
摘要:【UIPanel】 UIPanel is a component that collects and manages all widgets underneath it. UIPanel is responsible for creating the actual draw calls using...
阅读全文
UIButton
摘要:【UIButton】 Button is a simple component designed to receive hover, pressed and click events, and change the color of a remote sprite. You can also op...
阅读全文
UISprite
摘要:【UISprite】 UISprite用于引用一个UIAtlas中的sprite。 此脚本最强大的功能是Sprite Type,主要指定在需拉伸图片时的行为,它有以下几种值: 1)Simple:普通拉伸。 2)Sliced:九宫格拉伸,各边固定宽度通过Edit在UIAtlas中来...
阅读全文
UICamera
摘要:【UICamera】 UICamera是一个命名不太好的组件。实际上,它的名字某种原因只是为了保持向后兼容。UICamera脚本实际做的事是发送NGUI事件给所有被它所附加的摄像机所看见的对象。除此之外,它不对UI做任何事情了。实际上,如果你想要你的游戏中的对象能接收NGUI类似OnPress,O...
阅读全文
UIRoot
摘要:【UIRoot】 It's responsible for keeping the scale of the UI somewhat more manageable. UIRoot被放置在场景的根节点,用于决定整个NGUI层次如何绽放。因为子结点会跟随父结点绽放。 Scaling Style有...
阅读全文
UIAtlas
摘要:【UIAtlas】 UIAtlasis a container that has coordinate information for a bunch of sprites. AtlasType有2种: 1)Normal:此UIAtlas本身就是一个真的atlas,内含多个sprites。...
阅读全文
UIWidget
摘要:【UIWidget】 UIWidget在NGUI中的层次如下。 根据上篇所述,UIRect实现实现了Anchor功能。而Widget提供的功能也很简单,如下: 可以看到,widget只提供四个属性,alpha、pivot、depth、dimension。实际上widget就是sprit...
阅读全文
UIRect中的Anchor组件
摘要:【UIRect中的Anchor组件】 Anchor用于实现粘着功能,寄存于UIRect类中。Anchor的类型有三种: 1、None:不使用跟随功能。 2、Unified:四条边使用相同的Target。 3、Advanced:四条边分别拥有各自的Target。 在Anchor的...
阅读全文