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

最新文章

  1. 【轮子】发现一个效果丰富酷炫的Android动画库
  2. 我要崩溃了,要解出这么一段js代码背后的东西,这真是一坨啊,别被高度欺骗了,他还有宽度!!!!!试着按下方向右键
  3. POJ 3150 Cellular Automaton --矩阵快速幂及优化
  4. PDA调用WCF服务引用
  5. iOS开发:深入理解GCD 第一篇
  6. CSDN Markdown简明教程3-表格和公式
  7. Android开发之搜Ya项目说明(3)
  8. 跨域GET、POST请求
  9. JNI之C初探
  10. 第四周小组作业:Wordcount优化
  11. LINQ to Entities 不识别方法“System.DateTime AddDays(Double)
  12. 六、SpringBoot与数据访问
  13. 在linux中安装memcache服务器
  14. (转)SPI时钟极性、时钟相位
  15. Django具体操作(三)
  16. hdu 1.3.4 shǎ崽 OrOrOrOrz
  17. BZOJ5297 CQOI2018社交网络(矩阵树定理)
  18. Javascript显示和隐式类型转换
  19. BZOJ 1002 轮状病毒 矩阵树定理
  20. 迷你MVVM框架 avalonjs 组件编写指南

热门文章

  1. I/O的方法、输入流和输出流
  2. Http权威指南(概述篇总结)
  3. 2017年--10年java大神告诉你开发最常用的百分之二十的技术有哪些?
  4. 好强大的页面功能调试(js调试,查找js绑定的事件)值得学习
  5. logistic 回归Matlab代码
  6. centos下配置dns,gateway,ip
  7. HDU - 3949 :XOR(线性基,所有集合的不同异或和中,求从小到大第K个)
  8. SOA的挑战:实体集合【转】
  9. django保存一个object的时候会发出信号
  10. 基于Python语言使用RabbitMQ消息队列(六)