位置: 编程技术 - 正文

unity学习之GUI(unity gui教程)

编辑:rootadmin
今天我们学习了GUI即用户图形界面 GUI的几个方法。 Label Label (position : Rect, text : string) : void

推荐整理分享unity学习之GUI(unity gui教程),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:unity unity,unityngui,unity g,unity unity,unityngui,unity guiskin,unity guiskin,unity guid,内容如对您有帮助,希望把文章链接给更多的朋友!

Label (position : Rect, image : Texture) : void

GUI.Label(new Rect(, , , ), "Hellow World");

Texture2D img;

GUI.Label(new Rect(, , img.width, img.height), img);

Box

Box (position : Rect, text : string) : void

Box (position : Rect, image : Texture) : void

BOX的用法和Label的用法一样。

Button

Button (position : Rect, text : String) : bool

Button (position : Rect, image : Texture) : bool

Button (position : Rect, content : GUIContent) : bool

前两个和上面差不多,最后一个的用法 GUI.Button(new Rect(, , , ), new GUIContent("我有提示", "恭喜你中奖了"));

GUI .Label (new Rect (,,,),GUI .tooltip );

RepeatButton

RepeatButton (position : Rect, text : String) : bool

RepeatButton (position : Rect, image : Texture) : bool

RepeatButton (position : Rect, content : GUIContent) : bool

用法和Button相同

unity学习之GUI(unity gui教程)

TextField

TextField (position : Rect, text : String) : String

TextField (position : Rect, text : String, maxLength : int) : String

用法

string str = "请输入账号";

str = GUI.TextField(new Rect(, , , ), str)

PasswordField

PasswordField (position : Rect, password : String, maskChar : char) : String

PasswordField (position : Rect, password : String, maskChar : char, maxLength : int) : String

string str = "请输入密码";

str = GUI.PasswordField(new Rect(, , , ),str, '*');

'*'等价于"*"[0]

TextArea

TextArea (position : Rect, text : String) : String

TextArea (position : Rect, text : String, maxLength : int) : String

string str = "请输入密码";

str = GUI.TextArea(new Rect (,,,),str);

可以自动换行

Unity手机开发优化 做优化首先先要会看Game视图的Status参数1、FPSfps其实就是framespersecond,也就是每一秒游戏执行的帧数,这个数越小,说明游戏越卡。2、Drawcallsbatching之后

我在使用Unity 发布IOS真机过程时遇到的关于JIT的问题列表 Unity跨平台发布的优势是显而易见的.但还是会有一些坑.尤其是在IOS真机上.关于JIT的问题还是比较棘手的.而且是在unity中和模拟器中都是好的,一运行在

unity学习之用GUI实现视图的跳转 unity学习,希望我的博客能给喜欢unity的朋友带来帮助昨天我们讲了GUI的基础,在界面上添加文字,今天我们接着昨天的GUI基础往下学习,利用GUI来设计

本文链接地址:https://www.jiuchutong.com/biancheng/377316.html 转载请保留说明!

上一篇:unity集成facebook时,openssl android key 的一个解答(unity集成到app后变大了)

下一篇:Unity手机开发优化(unity开发手游)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络