標籤:present 一個 ring fill 地區 使用者 png 沒有 desire
Raw Image
原生圖片
The Raw 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 Image control but does not have the same set of options for animating the image and accurately filing the control rectangle. However, the Raw Image can display any texture whilst the Image can only show a Sprite texture.
Raw Image控制項向使用者展示一個不可互動的圖片。它可以被用作裝飾品、表徵圖等。而且Image可以用指令碼更改Image以反映其他控制項的更改。這個控制項類似於Image控制項但是沒有提供更多的設定來讓圖片用不同的方式填充空間的矩形空間。然而,Raw Image可以用所有類型的texture,Image控制項的texture卻必須是Sprite,
A Raw Image control
Properties
屬性
| Property: |
Function: |
| Texture |
The texture that represents the image to display. |
| Color |
The color to apply to the image. |
| Material |
The Material to use for rendering the image. |
| UV Rectangle |
The image’s offset and size within the control rectangle, given in normalized coordinates (range 0.0 to 1.0). The edges of the image are stretched to fill the space around the UV rectangle. |
| 屬性 |
功能 |
| Texture |
表示要顯示的映像的紋理 |
| Color |
要應用於映像的顏色 |
| Material |
用於渲染圖片的Material |
| UV Rectangle |
映像在控制項矩形地區內的位移和大小,以正常化座標(範圍為0.0到1.0)給出。 映像的邊緣被展開以填充UV矩形周圍的空間。
The image’s offset and size within the control rectangle, given in normalized coordinates (range 0.0 to 1.0). The edges of the image are stretched to fill the space around the UV rectangle.
|
Details
詳細
Since the Raw Image does not require a sprite texture, you can use it to display any texture available to the Unity player. For example, you might show an image downloaded from a URL using the WWW class or a texture from an object in a game.
由於原始映像不需要精靈紋理,因此可以使用它來顯示Unity可用的任何紋理。 例如,您可能會使用WWW類從URL下載的映像或來自遊戲中物體的紋理。
The UV Rectangle properties allow you to display a small section of a larger image. The X and Y coordinates specify which part of the image is aligned with the bottom left corner of the control. For example, an X coordinate of 0.25 will cut off the leftmost quarter of the image. The W and H (ie, width and height) properties indicate the width and height of the section of image that will be scaled to fit the control rectangle. For example, a width and height of 0.5 will scale a quarter of the image area up to the control rectangle. By changing these properties, you can zoom and scale the image as desired (see also the Scrollbar control).
UV Rectangle屬性允許你顯示較大映像的一小部分。X和Y座標指定映像的哪一部分與控制項的左下角對齊。例如,0.25的X座標將切斷映像的最左邊的四分之一。W和H(即,寬度和高度)屬性工作表示將被縮放以適合控制矩形的映像部分的寬度和高度。例如,寬度和高度為0.5將按比例縮放四分之一映像地區填滿控制項矩形。 通過更改這些屬性,可以根據需要縮放和縮放映像(另請參閱Scrollbar控制項)。
Unity2017.1官方UGUI文檔翻譯——Raw Image