查看: 2733|回复: 0
打印 上一主题 下一主题

[Unity 组件参考手册]组件:渲染组件之用户界面文本

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-2-5 14:40:11 |只看该作者 |倒序浏览
This group contains all Components that have to do with rendering in-game and user interface elements. Lighting and special effects are also included in this group.这个组包括在游戏中渲染和界面元素的所有组件。光照和特定效果也包含在这个组。
下面介绍用户界面文本。 GUI Text displays text of any font you import in screen coordinates.GUI Text 在屏幕坐标中显示你导入的任何字体的文本。
The GUI Text Inspector Please Note: Unity 2.0 introduced UnityGUI, a GUI Scripting system. You may prefer creating user interface elements with UnityGUI instead of GUI Texts. Read more about how to use UnityGUI in the GUI Scripting Guide.请注意: Unity 2.0 引入UnityGUI,它是一个GUI脚本系统。您可能更愿意用 UnityGUI代替GUI Text来创建用户界面元素 。了解更多有关如何使用UnityGUI 在GUI脚本指南
[Properties 属性]-------------------------------------------------------------------------------    Text 文本
    The string to display. 要显示的字符串。
    Anchor 锚
    The point at which the Text shares the position of the Transform.
    文本上的哪个点共享此变换的位置。
    Alignment 对齐
    How multiple lines are aligned within the GUIText.
    GUIText如何多行对齐。
    Pixel Offset 像素偏移
    Offset of the text relative to the position of the GUIText in the screen.
    文本中的相对于GUIText在屏幕上的位置的偏移。
    Line Spacing 行距
    How much space will be in-between lines of Text.
    文本行之间的间距
    Tab Size 制表符大小
    How much space will be inserted for a tab ('        ') character. As a multiplum of the space character offset.
    多少空格将***入一个选项卡("        ")字符。作为一个空格字符偏移量的倍数(德语multiplum 倍数)。
    Font 字体
    The Font to use when rendering the 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.
    如果启用,所有文本字符将以导入的字体纹理的大小来进行绘制。如果禁用,字符将被在变换规模的基础上进行调整 [Details 详情]-------------------------------------------------------------------------------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 screenTo import a font see the Font page.GUI Text用于在2D屏幕上打印文字。相机必须有一个GUI层关联,用来显示文本。摄像机包括一个默认的GUI层,所以如果你想显示GUI文本,不要删除它。GUI文本只使用X和Y轴定位。。。而不是在世界坐标中的位置进行定位,GUI Text被放置在屏幕坐标,(0,0)是左下角。(1,1)是在屏幕右上角 。要导入字体,见字体页。
Pixel Correct 像素修正By default, GUI Texts are rendered with Pixel Correct enabled. This makes them look crisp and they will stay the same size in pixels independent of the screen resolution.默认情况下,GUI文本会启用像素修正来显示的。这使得它们看起来干净利落的,他们将留在相同大小的像素,与屏幕的分辨率无关。
[Hints 提示]-------------------------------------------------------------------------------    When entering text into the Text property, you can create a line break by holding Alt and pressing Return.
    当在Text属性里输入文本,你可以通过按住Alt键,按回车键换行。
    If you are scripting the Text property, you can add line breaks by inserting the escape character "
" in your strings.
    如果你在脚本编辑Text属性,您可以通过插入转义字符" n"在你的字符串来换行。
    You can download free ***e type fonts from 1001freefonts.com (download the Windows fonts since they contain ***eType fonts).
    您可以从1001freefonts.com下载免费***e Type字体。 (下载Windows的字体,因为它们包含***eType字体) 【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

关闭

站长推荐上一条 /1 下一条

手机版|纳金网 ( 闽ICP备08008928号

GMT+8, 2024-5-6 12:43 , Processed in 0.088093 second(s), 33 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部