Unity2017.1官方UGUI文档翻译——Image

Image

图片

The Image control displays a non-interactive image to the user. This can be used for decoration, icons, etc, and the image can also be changed from a script to reflect changes in other controls. The control is similar to the Raw Image control but offers more options for animating the image and accurately filing the control rectangle. However, the Image control requires its texture to be a Sprite, while the Raw Image can accept any texture.

Image控件向用户展示一个不可交互的图片。它可以被用作装饰品、图标等。而且Image可以用脚本更改Image以反映其他控件的更改。这个控件类似于Raw Image控件但是提供了更多的设置来让图片用不同的方式填充空间的矩形空间。然而,Image控件的texture必须是Sprite,Raw Image却可以用所有类型的texture

An Image control

An Image control

一个Image控件

Properties

Property:Function:
Source Image The texture that represents the image to display (which must be imported as a Sprite).
Color The color to apply to the image.
Material The Material to use for rendering the image.
Raycast Target Should this be considered a target for raycasting?
Preserve Aspect Ensure image remains existing dimension.
Set Native Size Button to set the dimensions of the image box to the original pixel size of the texture.
属性功能
Source Image 表示要显示的图像的纹理 (必须导入为 Sprite).
Color 要应用于图像的颜色
Material 用于渲染图片的Material
Raycast Target 是否可以被射线投射
Preserve Aspect 确保图像保持现有的长宽比
Set Native Size

设置图片的尺寸为texture的原始像素大小

 

 

Details

详细

The image to display must be imported as a Sprite to work with the Image control.

要显示的图像必须导入为 Sprite才能放到Image控件中

posted @ 2017-12-14 20:35  破晓べ  阅读(658)  评论(0编辑  收藏  举报