包含9節(jié)視頻教程
這是臨摹的終極表現(xiàn)!在臨摹領(lǐng)域達(dá)到真實(shí)照片的級(jí)別,讓你的繪畫讓別人驚呼吧!這不是照片,真的是繪畫出來的。我們一起來學(xué)習(xí)吧!
![]()
|
![]() GUI Textures are displayed as flat images in 2D. They are made especially for user interface elements, buttons, or decorations. Their positioning and scaling is performed along the x and y axes only, and they are measured in Screen Coordinates, rather than World Coordinates. GUI紋理是顯示在二維的平面圖像。他們特別是于用戶界面元素,按鈕,或裝飾。它們的定位和縮放只通過改變X和Y軸來完成。它們是在屏幕坐標(biāo)測(cè)量,而不是世界坐標(biāo)。
Please Note: Unity 2.0 introduced UnityGUI, a GUI Scripting system. You may prefer creating user interface elements with UnityGUI instead of GUI Textures. Read more about how to use UnityGUI in the GUI Scripting Guide. 請(qǐng)注意: Unity 2.0 引入U(xiǎn)nityGUI,它是一個(gè)GUI腳本系統(tǒng)。您可能更愿意用UnityGUI代替GUI Textures來創(chuàng)建用戶界面元素 。了解更多有關(guān)如何使用UnityGUI在GUI腳本指南。 Properties 屬性
Details 詳情To create a GUITexture 創(chuàng)建一個(gè)GUITexture:
GUI Textures are perfect for presenting game interface backgrounds, buttons, or other elements to the player. Through scripting, you can easily provide visual feedback for different "states" of the texture -- when the mouse is hovering over the texture, or is actively clicking it for example. Here is the basic breakdown of how the GUI Texture is calculated: GUI紋理向玩家完美表現(xiàn)游戲界面背景,按鈕,或其他元素。通過腳本,你可以很容易地提供視覺反饋,針對(duì)不同的"狀態(tài)"的紋理 – 比如說: 當(dāng)鼠標(biāo)懸停在紋理上,或正在點(diǎn)擊紋理。這里是GUI??的紋理是如何計(jì)算的基本分類:
Borders 邊界The number of pixels that will not scale with the texture at each edge of the image. As you rarely know the resolution your game runs in, chances are your GUI will get scaled. Some GUI textures have a border at the edge that is meant to be an exact number of pixels. In order for this to work, set the border sizes to match those from the texture. 像素的總數(shù)不與在圖像上各邊緣的紋理成比例。正如你很少知道你的游戲運(yùn)行的分辨率 ,GUI將擴(kuò)展。一些GUI紋理的邊緣有邊框,它應(yīng)該是一個(gè)確切的像素?cái)?shù)量。為了讓他可行,設(shè)置邊框的大小以匹配紋理。 Pixel Inset 像素嵌入The purpose of the Pixel Inset is to prevent textures from scaling with screen resolution, and keeping thim in a fixed pixel size. This allows you to render a texture without any scaling. This means that players who run your game in higher resolutions will see your textures in smaller areas of the screen, allowing them to have more screen real-estate for your gameplay graphics. 像素嵌入的目的是為了防止紋理與屏幕分辨率成比例和保持固定像素大小。這可以讓你沒有任何縮放地渲染一個(gè)紋理 。這意味著玩家更高的分辨率下運(yùn)行游戲?qū)⒖吹侥愕募y理變小了,讓他們有更屏幕資源去顯示你的游戲圖形。 To use it effectively, you need to set the scale of the GUI Texture's Transform to (0, 0, 0). Now, the Pixel Inset is in full control of the texture's size and you can set the Pixel Inset values to be the exact pixel size of your Texture. 為了有效地使用它,你需要設(shè)定GUI紋理變換屬性(Transform)里的大小(scale)設(shè)置為(0,0,0)。現(xiàn)在,像素嵌入是完全控制紋理的大小,你可以設(shè)置你的像素嵌入值為你的紋理確切的像素大小。 Hints 提示
贊0 踩0 |
未知用戶
2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved
VIP