包含9節(jié)視頻教程
這是臨摹的終極表現(xiàn)!在臨摹領(lǐng)域達(dá)到真實(shí)照片的級(jí)別,讓你的繪畫讓別人驚呼吧!這不是照片,真的是繪畫出來(lái)的。我們一起來(lái)學(xué)習(xí)吧!
|
GUISkins are a collection of GUIStyles that can be applied to your GUI. Each Control type has its own Style definition. Skins are intended to allow you to apply style to an entire UI, instead of a single Control by itself. 圖形用戶界面皮膚是圖形用戶界面樣式的集合,它可以被應(yīng)用于你的圖形用戶界面,每個(gè)控件類型擁有它們自己的樣式定義,皮膚的功能是為你所有用戶界面應(yīng)用樣式,而不是單獨(dú)的為某個(gè)控件應(yīng)用。
To create a GUISkin, select Assets->Create->GUI Skin from the menubar. 想要?jiǎng)?chuàng)建一個(gè)圖形用戶界面皮膚,在菜單欄中選擇Assets->Create->GUI Skin GUISkins are part of the UnityGUI system. For more detailed information about UnityGUI, please take a look at the GUI Scripting Guide. 圖形用戶界面皮膚是Unity圖形用戶界面系統(tǒng)的一部分,想知道更多關(guān)于Unity圖形用戶界面的詳細(xì)信息,請(qǐng)看看圖形用戶界面腳本指南。 Properties 屬性All of the properties within a GUI Skin are an individual GUIStyle. Please read the GUIStyle page for more information about how to use Styles. 圖形用戶界面皮膚的每個(gè)屬性都是一個(gè)單獨(dú)的圖形用戶界面樣式,請(qǐng)參閱用戶圖形界面樣式頁(yè)面獲取更多關(guān)于如何使用樣式的信息。
Details 詳細(xì)When you are creating an entire GUI for your game, you will likely need to do a lot of customization for every different Control type. In many different game genres, like real-time strategy or role-playing, there is a need for practically every single Control type. 當(dāng)你在你的游戲中創(chuàng)建一套圖形用戶界面時(shí),你可能需要為每個(gè)不同的控件類型進(jìn)行大量的定制。在許多不同類型的游戲中,像實(shí)時(shí)策略游戲或角色扮演游戲,幾乎每個(gè)控件類型都需要。 Because each individual Control uses a particular Style, it does not make sense to create a dozen-plus individual Styles and assign them all manually. GUI Skins take care of this problem for you. By creating a GUI Skin, you have a pre-defined collection of Styles for every individual Control. You then apply the Skin with a single line of code, which eliminates the need to manually specify the Style of each individual Control. 因?yàn)槊總(gè)控件都是用其特定的樣式,創(chuàng)建一大堆獨(dú)立的樣式然后手動(dòng)分配是沒(méi)有必要的。圖形用戶界面皮膚能幫你解決這個(gè)問(wèn)題,通過(guò)創(chuàng)建一個(gè)圖形用戶界面皮膚,你將擁有一個(gè)預(yù)定義的樣式集合對(duì)應(yīng)每個(gè)控件。你主需要一行代碼就能應(yīng)用這個(gè)皮膚,免去了手動(dòng)為每個(gè)控件去指定樣式。 Creating GUISkins 創(chuàng)建圖形用戶界面皮膚GUISkins are asset files. To create a GUI Skin, select Assets->Create->GUI Skin from the menubar. This will put a new GUISkin in your Project View. 圖形用戶界面皮膚是資源文件,需要?jiǎng)?chuàng)建一個(gè)圖形用戶界面皮膚,請(qǐng)選擇菜單欄中的Assets->Create->GUI Skin 這將會(huì)在你的Project視窗中放入一個(gè)新的圖形用戶界面皮膚文件。
Editing GUISkins 編輯圖形用戶界面皮膚After you have created a GUISkin, you can edit all of the Styles it contains in the Inspector. For example, the Text Field Style will be applied to all Text Field Controls. 當(dāng)你創(chuàng)建完一個(gè)圖形用戶界面皮膚之后,你可以在監(jiān)視窗中編輯它包含的所有樣式,例如,文本框樣式將被應(yīng)用于所有的文本框控件。
No matter how many Text Fields you create in your script, they will all use this Style. Of course, you have control over changing the styles of one Text Field over the other if you wish. We'll discuss how that is done next. 不管你通過(guò)腳本創(chuàng)建了多少個(gè)文本框,它們都會(huì)使用這個(gè)樣式,當(dāng)然,你可以根據(jù)需要單獨(dú)改變其中某個(gè)文本框的樣式,稍后我們將講解如何去做。 Applying GUISkins 應(yīng)用圖形用戶界面皮膚To apply a GUISkin to your GUI, you must use a simple script to read and apply the Skin to your Controls. 如需在你的圖形用戶界面中使用圖形用戶界面皮膚,你必須使用一個(gè)簡(jiǎn)單的腳本去讀取和使用皮膚到你的控件。 In some cases you want to have two of the same Control with different Styles. For this, it does not make sense to create a new Skin and re-assign it. Instead, you use one of the Custom Styles in the skin. Provide a Name for the custom Style, and you can use that name as the last argument of the individual Control. 有時(shí)候你可能會(huì)需要兩個(gè)相同的控件但是樣式不同,為此,創(chuàng)建一個(gè)新的皮膚并指定它并不是一個(gè)好辦法,反而,你可以在皮膚中添加一個(gè)自定義樣式。 為自定義樣式設(shè)定一個(gè)名字,然后將這個(gè)名字提供給控件的最后一個(gè)參數(shù)。 For more information about working with GUIStyles, please read the GUIStyle page. For more information about using UnityGUI, please read the GUI Scripting Guide. 如需更多關(guān)于使用圖形用戶界面樣式的信息,請(qǐng)參閱用戶圖形界面樣式頁(yè)面。如需獲取更多關(guān)于使用Unity圖形用戶界面的信息,請(qǐng)參閱圖形用戶界面腳本指南。 贊0 踩0 |
未知用戶
2005-2024 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2024 ZhuFeng Community All Rights Reserved
VIP