关于UGUI RectTransform的几个参数的获取和修改(待补充)
来源:互联网 发布:炽焰帝国2激活码淘宝 编辑:程序博客网 时间:2024/06/06 05:23
1.改变RectTransform的top
GetComponent<RectTransform>().offsetMax = new Vector2(GetComponent<RectTransform>().offsetMax.x, top);
2.改变RectTransform的bottom
GetComponent<RectTransform>().offsetMin = new Vector2(GetComponent<RectTransform>().offsetMin.x, bottom);
3.改变RectTransform的width,height
GetComponent<RectTransform>().sizeDelta = new Vector2(width, height);
4.改变RectTransform的pos
GetComponent<RectTransform>().anchoredPosition3D = new Vector3(posx,posy,posz);
GetComponent<RectTransform>().anchoredPosition = new Vector2(posx,posy);
GetComponent<RectTransform>().offsetMax = new Vector2(GetComponent<RectTransform>().offsetMax.x, top);
2.改变RectTransform的bottom
GetComponent<RectTransform>().offsetMin = new Vector2(GetComponent<RectTransform>().offsetMin.x, bottom);
3.改变RectTransform的width,height
GetComponent<RectTransform>().sizeDelta = new Vector2(width, height);
4.改变RectTransform的pos
GetComponent<RectTransform>().anchoredPosition3D = new Vector3(posx,posy,posz);
GetComponent<RectTransform>().anchoredPosition = new Vector2(posx,posy);
0 0
- 关于UGUI RectTransform的几个参数的获取和修改(待补充)
- 关于UGUI中RectTransform组件的获取问题
- Unity UGUI 的RectTransform参数的设置
- Unity UGUI 的RectTransform参数的设置
- UGUI 计算RectTransform的Bounds
- U3D 新UI系统UGUI 的recttransform一些参数的设置
- 关于Unity3D的UGUI中RectTransform组件的各属性的解释
- 动态修改RectTransform的值
- c++的一些开源库(待补充修改)
- 关于RectTransform的一些研究
- Unity3D--关于RectTransform的总结
- Unity4.6中修改RectTransform的宽度和高度
- 【Unity】UGUI怎么计算RectTransform中的Top和Bottom的值
- 关于CPP的字符串大小写转换(待补充)
- ugui在运行时改变RectTransform的大小
- ugui在运行时改变RectTransform的大小
- Unity3D UGUI组件的Inspector属性探究(一)--RectTransform
- @property关键字和几个描述符号(不全,待补充)
- 构造函数和析构函数的使用
- Project Euler :Problem 54 Poker hands
- 网页中引用优酷播放器并使其被遮罩层遮住
- Android自定义消息推送
- iOS开发笔记--多手势事件
- 关于UGUI RectTransform的几个参数的获取和修改(待补充)
- linux c编程中调用 shell 命令
- mongodb aggregate 级联查询
- Hibernate annotation配置方式的MappedBy使用详解
- 65Valid Number
- 【Objective-C Runtime】Objective-C Runtime文章收集
- ”无法启动程序“..\proj.win32\Debug.win32\xxx.dll
- 使用memcached加速web应用实例
- C#开发Unity游戏教程之游戏对象的属性变量