Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
global:gui [2015/05/18 03:17] Mistermind |
global:gui [2016/09/28 04:58] Mistermind [Screens] |
Here you can set several in-game GUI options and freely use the information in your own GUI scripts. | Here you can set several in-game GUI options and freely use the information in your own GUI scripts. |
| |
It is __HIGHLY__ recommended that you go through [[https://unity3d.com/learn/tutorials/modules/beginner/ui|Unity's UI tutorials]] to learn more about how Unity handles UI elements in version 5+. It can be confusing for newcomers, especially if they were used to the old GUITextures method of handling the UI (before UFE 1.6). However, it is also much more powerful and you'll be able to create better UIs and in much less time. | It's recommended that you go through [[https://unity3d.com/learn/tutorials/modules/beginner/ui|Unity's UI tutorials]] to learn more about how Unity handles UI elements in version 5+. |
| |
__**NOTE:**__ | |
* UFE includes a very handy Open/Close button to enable very easy editing of your UI prefabs. | |
* There is a nice Gradient.cs script located in ''.\UFE\Scripts\UI\Community Scripts\''. This script will work on fonts or any other sprite and creates a vertical gradient of the selected colors. | |
| |
{{ :global:global_guioptions.png?nolink |}} | {{ :global:global_guioptions.png?nolink |}} |
| |
| |
UI Template scripts: ''.\UFE\Scripts\UI\Templates\''\\ | UI Template scripts: ''.\UFE\Scripts\UI\Templates\'' (any version)\\ |
UI Base scripts: ''.\UFE\Scripts\UI\Base\''\\ | UI Base scripts: ''.\UFE\Scripts\UI\Base\'' ([[:prices|Source and Bundle]] only) |
| |
---- | ---- |
| |
**Default Fade Duration:** The default fade time between screens. | **Screen Fade-in Duration:** The default fade time between menu screens. |
| |
| **Screen Fade-in Color:** The default fade color between menu screens. |
| |
| **Game Fade-in Duration:** The fade-in time from the loading screen to the match. |
| |
| **Game Fade-in Color:** The fade-in color from the loading screen to the match. |
| |
| **Round Fade-in Duration:** The fade-in time in between rounds. |
| |
| **Round Fade-in Color:** The fade-in color in between rounds. |
| |
**Gauge/Meter:** If disabled the game will ignore any gauge/meter calls from the engine. | **Gauge/Meter:** If disabled the game will ignore any gauge/meter calls from the engine. |
---- | ---- |
===== Screens ===== | ===== Screens ===== |
Create prefabs of your UI elements and assign them to the corresponding fields below. | Click ''Open'' to start editing each of the screens. You will find several custom options including sounds, music, interface elements, and an easy-to-use UI editor under the hierarchy tab. Each screen has its own set of options and you can access them under the Inspector tab. No coding is required. |
| |
To create your own UI screens, we recommend duplicating a default one then editing as you see fit, including the UI script. All UI scripts are open source on all versions of UFE, and are commented to help understand the functions. | To create your own UI screens we recommend you first duplicate one of the defaults and edit as you see fit (including the UI script). All UI scripts are open source on all versions of UFE, and are commented to help understand the functions. |
| |
{{ :layout2.png?direct&850 |}} | {{ :layout2.png?direct&850 |}} |
| |
{{ :global:global_networkui.png?direct&850 |}} | {{ :global:global_networkui.png?direct&850 |}} |
==== Network Mode (Requires Network Addon) ==== | ==== Network Mode ==== |
* Network Game: (NetworkGameScreen) | * Network Game: (NetworkGameScreen) |
* Host Game: (HostGameScreen) | * Host Game: (HostGameScreen) |
| |
**Notes:** | **Notes:** |
| * UFE includes a very handy Open/Close button to enable very easy editing of your UI prefabs. |
* Each UFEScreen script (and their inheritance) has a //Canvas Preview// toggle. Turning this off will select the prefab instead of creating a preview with the ''Open'' button. This is useful for Video Screens, where you do not need a preview created. | * Each UFEScreen script (and their inheritance) has a //Canvas Preview// toggle. Turning this off will select the prefab instead of creating a preview with the ''Open'' button. This is useful for Video Screens, where you do not need a preview created. |
| * There is a nice Gradient.cs script located in ''.\UFE\Scripts\UI\Community Scripts\''. This script will work on fonts or any other sprite and creates a vertical gradient of the selected colors. |
| * For more on how to call each screen individually see [[:code|Coding with UFE]]. |
| |
| |
| |
| ---- |
| ===== Video Tutorial ===== |
| {{youtube>large:ZnbRpPUDJnU }} |
| |
| |
---- | ---- |
| |
''UFE.config.gameGUI'' | ''UFE.config.gameGUI'' |
| |
| Example: |
| <code c#> |
| void OnStart(){ |
| UFE.StartIntroScreen(1f); |
| } |
| </code> |
| |
---- | ---- |
| |
[[global:start|< Back to Global Editor]] | [[global:start|< Back to Global Editor]] |