12
12
13
13
namespace UMA
14
14
{
15
-
15
+ [ InitializeOnLoad ]
16
16
public class WelcomeToUMA : EditorWindow
17
17
{
18
18
@@ -21,6 +21,30 @@ public static WelcomeToUMA Instance
21
21
get ; set ;
22
22
}
23
23
24
+ static WelcomeToUMA ( )
25
+ {
26
+ EditorApplication . delayCall += DelayedCall ;
27
+ }
28
+
29
+ static void DelayedCall ( )
30
+ {
31
+ EditorApplication . update += Update ;
32
+ }
33
+
34
+ public static void Update ( )
35
+ {
36
+ UMASettings settings = UMASettings . GetOrCreateSettings ( ) ;
37
+ if ( settings == null )
38
+ {
39
+ return ;
40
+ }
41
+ if ( settings . showWelcomeToUMA )
42
+ {
43
+ ShowWindow ( ) ;
44
+ }
45
+ EditorApplication . update -= Update ;
46
+ }
47
+
24
48
[ MenuItem ( "UMA/Welcome to UMA" , false , 0 ) ]
25
49
public static void ShowWindow ( )
26
50
{
@@ -106,7 +130,7 @@ public void Error(string message)
106
130
public bool processing = false ;
107
131
public bool initialized = false ;
108
132
109
-
133
+ public UMASettings initialSettings ;
110
134
111
135
112
136
public void OnEnable ( )
@@ -164,6 +188,7 @@ public void DelayAwake()
164
188
165
189
//DescriptionStyle.fixedHeight = 48;
166
190
191
+ initialSettings = UMASettings . GetOrCreateSettings ( ) ;
167
192
currentButton = 0 ;
168
193
DoWelcome ( ) ;
169
194
initialized = true ;
@@ -225,6 +250,26 @@ public void DrawNavigation()
225
250
if ( GUILayout . Button ( "Basics" , GUILayout . Height ( 40 ) ) )
226
251
{
227
252
ClearLog ( ) ;
253
+ AddText ( "UMA is a runtime character creation system for Unity3D" ) ;
254
+ AddText ( "It relies on a library of indexed items to create characters" ) ;
255
+ AddText ( "The library data can be in Resources and/or in Addressable Bundles" ) ;
256
+ AddSeperator ( ) ;
257
+ AddText ( "UMA uses a generator to create characters - UMA_GLIB" ) ;
258
+ AddText ( "This prefab needs to be in a scene for UMA to work." ) ;
259
+ AddText ( "The generator has settings for texture merging, mesh combining, and more." ) ;
260
+ AddText ( "To get started, use the 'Add an UMA to the current scene' button" ) ;
261
+ AddText ( "This will add an editable UMA and generator, if needed" ) ;
262
+ AddSeperator ( ) ;
263
+ AddText ( "UMA uses recipes to define meshes, textures, and other data" ) ;
264
+ AddText ( "The following are the main base parts of an UMA:" ) ;
265
+ AddText ( "SlotData: This contains a mesh part, along with any rig parts needed." ) ;
266
+ AddText ( "OverlayData: This contains texture parts that are colorized and combined to build textures." ) ;
267
+ AddText ( "DNA: This is used to adjust the meshes when built, either bone modifications or blendshapes" ) ;
268
+ AddText ( "Recipes: These are used to tied slotdata and overlays together, to build skinned meshes" ) ;
269
+ AddText ( "RaceData: This defines a base recipe for the character, what wardrobe slots are available, what DNA converters are used, etc." ) ;
270
+ AddSeperator ( ) ;
271
+ AddText ( "We recommend to watch the videos on youtube for a deeper dive into how UMA works" ) ;
272
+ AddText ( "https://www.youtube.com/@SecretAnorak/videos" ) ;
228
273
// explain about the generator
229
274
// about the library
230
275
// about races
@@ -282,6 +327,20 @@ public void DrawNavigation()
282
327
// Links page has to be done in content window
283
328
currentButton = 5 ;
284
329
}
330
+ if ( initialSettings . showWelcomeToUMA )
331
+ {
332
+ if ( GUILayout . Button ( "Turn this off!!" ) )
333
+ {
334
+ currentButton = 9 ;
335
+ ClearLog ( ) ;
336
+ UMASettings settings = UMASettings . GetOrCreateSettings ( ) ;
337
+ settings . showWelcomeToUMA = false ;
338
+ EditorUtility . SetDirty ( settings ) ;
339
+ AddText ( "The welcome window will no longer show when Unity is opened" ) ;
340
+ AddText ( "To view it at any time, you can use the 'UMA/Welcome to UMA' menu item" ) ;
341
+ AddText ( "You can re-enable this in the UMA project settings." ) ;
342
+ }
343
+ }
285
344
GUILayout . EndVertical ( ) ;
286
345
GUIHelper . EndInsetArea ( ) ;
287
346
}
@@ -1482,6 +1541,8 @@ private void DoLinksPage()
1482
1541
ShowLink ( "Wiki" , "UMA Wiki" , settings . WikiURL ) ;
1483
1542
ShowLink ( "Forum" , "UMA Forum" , settings . ForumURL ) ;
1484
1543
ShowLink ( "Asset Store" , "UMA on the Asset Store" , settings . AssetStoreURL ) ;
1544
+ ShowLink ( "GitHub" , "UMA on GitHub" , settings . GithubURL ) ;
1545
+ ShowLink ( "Youtube" , "SecretAnorak's UMA Videos" , settings . YoutubeURL ) ;
1485
1546
}
1486
1547
#endregion
1487
1548
0 commit comments