3D Text & GUI Text & GUI Texture
【Unity3D Text】
3D Text通过"Text Mesh"组件、"MeshRender共同完成",通过如下方法要以创建一个3D Text。
3D Text对象包含如下组件:
最常用的需要所有人都关注的三个方法如下:
Font必须是ttf字体,导入ttf很简单,直接把ttf文件放入工程的Asset目录或子目录中即可。
参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/class-TextMesh.html
【GUI Text】
通过 Hierarchy 中的"Create" -> "GUI Text"创建。
其中关键参数有几下几个:
Material: Reference to the Material containing the characters to be drawn. If set, this property overrides the one in the Font asset.
Pixel Correct:If enabled, all Text characters will be drawn in the size of the imported font texture. If disabled, the characters will be resized based on the Transform's Scale.
注意要点:
GUI Texts are used to print text onto the screen in 2D. The Camera has to have a GUI Layer attached in order to render the text. Cameras include a GUI Layer by default, so don't remove it if you want to display a GUI Text. GUI Texts are positioned using only the X and Y axes. Rather than being positioned in World Coordinates, GUI Texts are positioned in Screen Coordinates, where (0,0) is the bottom-left and (1,1) is the top-right corner of the screen.
【GUILayer】
【GUI Texture】
GUI Texture用于显示一个texture,一个texture可以用作九宫格。另外一个texture有大小。
GUI Texture属性如上,很简单。和GUI Text一样,它俩作为仅有的2个受GUILayer组件影响的对象,是Unity抛弃的东西,UnityGUI被设计用来替代它俩。
参考:file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Components/class-GuiTexture.html
最新文章
- 【轮子】发现一个效果丰富酷炫的Android动画库
- 我要崩溃了,要解出这么一段js代码背后的东西,这真是一坨啊,别被高度欺骗了,他还有宽度!!!!!试着按下方向右键
- POJ 3150 Cellular Automaton --矩阵快速幂及优化
- PDA调用WCF服务引用
- iOS开发:深入理解GCD 第一篇
- CSDN Markdown简明教程3-表格和公式
- Android开发之搜Ya项目说明(3)
- 跨域GET、POST请求
- JNI之C初探
- 第四周小组作业:Wordcount优化
- LINQ to Entities 不识别方法“System.DateTime AddDays(Double)
- 六、SpringBoot与数据访问
- 在linux中安装memcache服务器
- (转)SPI时钟极性、时钟相位
- Django具体操作(三)
- hdu 1.3.4 shǎ崽 OrOrOrOrz
- BZOJ5297 CQOI2018社交网络(矩阵树定理)
- Javascript显示和隐式类型转换
- BZOJ 1002 轮状病毒 矩阵树定理
- 迷你MVVM框架 avalonjs 组件编写指南