NGUI v2.0 UI_1:UIAnchor UI锚定类

UIAnchor

 

UIAnchor Class Reference

UIAnchor类引用

This script can be used to anchor an object to the side of the screen, or scale an object to always match the dimensions of the screen.More...

UIAnchor类ReferenceThis脚本可以用来锚定一个对象到屏幕的边上,或缩放象来匹配屏幕的尺寸。更多…

List of all members.

成员列表

Public Types公共类型

enum  Side  边

Public Member Functions公共成员函数

void Update ()
 Anchor the object to the appropriate point. 锚对象到适当的点。

Public Attributes公共属性

Camera uiCamera = null  //绘制Ui的摄像机
Side side = Side.Center  //枚举值 中心
bool halfPixelOffset = true  //偏移半个像素 躲避Direct的一个Bug
bool stretchToFill = false //拉伸填充
float depthOffset = 0f  //深度偏移
 
补充:
 Vector2 relativeOffset = Vector2.zero  //相对偏移
 

Detailed Description详细描述

This script can be used to anchor an object to the side of the screen, or scale an object to always match the dimensions of the screen.

这个脚本可以用来锚定一个对象的两边的屏幕上,或规模对象总是匹配屏幕的尺寸。

 


Member Function Documentation
成员函数文档

void UIAnchor.Update( )
 
补充:
 void OnEnable ()  //Automatically find the camera responsible for drawing the widgets under this object.自动找到照相机负责绘制窗口小部件在这个对象。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值