@@ -12,6 +12,11 @@ namespace OxGFrame.CoreFrame
12
12
{
13
13
public static class CoreFrames
14
14
{
15
+ /// <summary>
16
+ /// Default group id
17
+ /// </summary>
18
+ internal const int DEFAULT_GROUP_ID = 0 ;
19
+
15
20
public static class UIFrame
16
21
{
17
22
public static bool ignoreTimeScale
@@ -200,6 +205,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
200
205
#region Show
201
206
/// <summary>
202
207
/// If use prefix "res#" will load from resources else will load from bundle
208
+ /// <para>Default group id is 0</para>
203
209
/// </summary>
204
210
/// <param name="assetName"></param>
205
211
/// <param name="data"></param>
@@ -211,12 +217,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
211
217
public static async UniTask < UIBase > Show ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
212
218
{
213
219
var packageName = AssetPatcher . GetDefaultPackageName ( ) ;
214
- return await UIManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
220
+ return await UIManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
215
221
}
216
222
217
223
public static async UniTask < UIBase > Show ( string packageName , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
218
224
{
219
- return await UIManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
225
+ return await UIManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
220
226
}
221
227
222
228
public static async UniTask < UIBase > Show ( int groupId , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
@@ -233,12 +239,12 @@ public static async UniTask<UIBase> Show(int groupId, string packageName, string
233
239
public static async UniTask < T > Show < T > ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : UIBase
234
240
{
235
241
var packageName = AssetPatcher . GetDefaultPackageName ( ) ;
236
- return await UIManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
242
+ return await UIManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
237
243
}
238
244
239
245
public static async UniTask < T > Show < T > ( string packageName , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : UIBase
240
246
{
241
- return await UIManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
247
+ return await UIManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
242
248
}
243
249
244
250
public static async UniTask < T > Show < T > ( int groupId , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : UIBase
@@ -259,19 +265,31 @@ public static void Close(string assetName, bool disabledPreClose = false, bool f
259
265
UIManager . GetInstance ( ) . Close ( assetName , disabledPreClose , forceDestroy ) ;
260
266
}
261
267
268
+ /// <summary>
269
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
270
+ /// </summary>
271
+ /// <param name="disabledPreClose"></param>
272
+ /// <param name="forceDestroy"></param>
273
+ /// <param name="withoutAssetNames"></param>
262
274
public static void CloseAll ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
263
275
{
264
- UIManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
276
+ UIManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
265
277
}
266
278
267
279
public static void CloseAll ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
268
280
{
269
281
UIManager . GetInstance ( ) . CloseAll ( groupId , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
270
282
}
271
283
284
+ /// <summary>
285
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
286
+ /// </summary>
287
+ /// <param name="disabledPreClose"></param>
288
+ /// <param name="forceDestroy"></param>
289
+ /// <param name="withoutAssetNames"></param>
272
290
public static void CloseAllAndExcluded ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
273
291
{
274
- UIManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
292
+ UIManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
275
293
}
276
294
277
295
public static void CloseAllAndExcluded ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
@@ -287,7 +305,7 @@ public static void CloseAllAndExcluded(int groupId, bool disabledPreClose = fals
287
305
/// <param name="forceDestroy"></param>
288
306
public static void CloseStackByStack ( string canvasName , bool disabledPreClose = false , bool forceDestroy = false )
289
307
{
290
- UIManager . GetInstance ( ) . CloseStackByStack ( 0 , canvasName , disabledPreClose , forceDestroy ) ;
308
+ UIManager . GetInstance ( ) . CloseStackByStack ( DEFAULT_GROUP_ID , canvasName , disabledPreClose , forceDestroy ) ;
291
309
}
292
310
293
311
/// <summary>
@@ -309,9 +327,12 @@ public static void Reveal(string assetName)
309
327
UIManager . GetInstance ( ) . Reveal ( assetName ) ;
310
328
}
311
329
330
+ /// <summary>
331
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
332
+ /// </summary>
312
333
public static void RevealAll ( )
313
334
{
314
- UIManager . GetInstance ( ) . RevealAll ( ) ;
335
+ UIManager . GetInstance ( ) . RevealAll ( DEFAULT_GROUP_ID ) ;
315
336
}
316
337
317
338
public static void RevealAll ( int groupId )
@@ -326,19 +347,27 @@ public static void Hide(string assetName)
326
347
UIManager . GetInstance ( ) . Hide ( assetName ) ;
327
348
}
328
349
350
+ /// <summary>
351
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
352
+ /// </summary>
353
+ /// <param name="withoutAssetNames"></param>
329
354
public static void HideAll ( params string [ ] withoutAssetNames )
330
355
{
331
- UIManager . GetInstance ( ) . HideAll ( false , withoutAssetNames ) ;
356
+ UIManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , false , withoutAssetNames ) ;
332
357
}
333
358
334
359
public static void HideAll ( int groupId , params string [ ] withoutAssetNames )
335
360
{
336
361
UIManager . GetInstance ( ) . HideAll ( groupId , false , withoutAssetNames ) ;
337
362
}
338
363
364
+ /// <summary>
365
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
366
+ /// </summary>
367
+ /// <param name="withoutAssetNames"></param>
339
368
public static void HideAllAndExcluded ( params string [ ] withoutAssetNames )
340
369
{
341
- UIManager . GetInstance ( ) . HideAll ( true , withoutAssetNames ) ;
370
+ UIManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , true , withoutAssetNames ) ;
342
371
}
343
372
344
373
public static void HideAllAndExcluded ( int groupId , params string [ ] withoutAssetNames )
@@ -505,6 +534,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
505
534
#region Show
506
535
/// <summary>
507
536
/// If use prefix "res#" will load from resources else will load from bundle
537
+ /// <para>Default group id is 0</para>
508
538
/// </summary>
509
539
/// <param name="assetName"></param>
510
540
/// <param name="data"></param>
@@ -516,12 +546,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
516
546
public static async UniTask < SRBase > Show ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
517
547
{
518
548
var packageName = AssetPatcher . GetDefaultPackageName ( ) ;
519
- return await SRManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
549
+ return await SRManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
520
550
}
521
551
522
552
public static async UniTask < SRBase > Show ( string packageName , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
523
553
{
524
- return await SRManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
554
+ return await SRManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) ;
525
555
}
526
556
527
557
public static async UniTask < SRBase > Show ( int groupId , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
@@ -538,12 +568,12 @@ public static async UniTask<SRBase> Show(int groupId, string packageName, string
538
568
public static async UniTask < T > Show < T > ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : SRBase
539
569
{
540
570
var packageName = AssetPatcher . GetDefaultPackageName ( ) ;
541
- return await SRManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
571
+ return await SRManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
542
572
}
543
573
544
574
public static async UniTask < T > Show < T > ( string packageName , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : SRBase
545
575
{
546
- return await SRManager . GetInstance ( ) . Show ( 0 , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
576
+ return await SRManager . GetInstance ( ) . Show ( DEFAULT_GROUP_ID , packageName , assetName , data , awaitingUIAssetName , priority , progression , parent ) as T ;
547
577
}
548
578
549
579
public static async UniTask < T > Show < T > ( int groupId , string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null ) where T : SRBase
@@ -564,19 +594,31 @@ public static void Close(string assetName, bool disabledPreClose = false, bool f
564
594
SRManager . GetInstance ( ) . Close ( assetName , disabledPreClose , forceDestroy ) ;
565
595
}
566
596
597
+ /// <summary>
598
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
599
+ /// </summary>
600
+ /// <param name="disabledPreClose"></param>
601
+ /// <param name="forceDestroy"></param>
602
+ /// <param name="withoutAssetNames"></param>
567
603
public static void CloseAll ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
568
604
{
569
- SRManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
605
+ SRManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
570
606
}
571
607
572
608
public static void CloseAll ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
573
609
{
574
610
SRManager . GetInstance ( ) . CloseAll ( groupId , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
575
611
}
576
612
613
+ /// <summary>
614
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
615
+ /// </summary>
616
+ /// <param name="disabledPreClose"></param>
617
+ /// <param name="forceDestroy"></param>
618
+ /// <param name="withoutAssetNames"></param>
577
619
public static void CloseAllAndExcluded ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
578
620
{
579
- SRManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
621
+ SRManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
580
622
}
581
623
582
624
public static void CloseAllAndExcluded ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
@@ -591,9 +633,12 @@ public static void Reveal(string assetName)
591
633
SRManager . GetInstance ( ) . Reveal ( assetName ) ;
592
634
}
593
635
636
+ /// <summary>
637
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
638
+ /// </summary>
594
639
public static void RevealAll ( )
595
640
{
596
- SRManager . GetInstance ( ) . RevealAll ( ) ;
641
+ SRManager . GetInstance ( ) . RevealAll ( DEFAULT_GROUP_ID ) ;
597
642
}
598
643
599
644
public static void RevealAll ( int groupId )
@@ -610,17 +655,26 @@ public static void Hide(string assetName)
610
655
611
656
public static void HideAll ( params string [ ] withoutAssetNames )
612
657
{
613
- SRManager . GetInstance ( ) . HideAll ( false , withoutAssetNames ) ;
658
+ SRManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , false , withoutAssetNames ) ;
614
659
}
615
660
661
+ /// <summary>
662
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
663
+ /// </summary>
664
+ /// <param name="groupId"></param>
665
+ /// <param name="withoutAssetNames"></param>
616
666
public static void HideAll ( int groupId , params string [ ] withoutAssetNames )
617
667
{
618
668
SRManager . GetInstance ( ) . HideAll ( groupId , false , withoutAssetNames ) ;
619
669
}
620
670
671
+ /// <summary>
672
+ /// Default group id is 0, but if you don't want to execute based on the group id and want to do all, can set the group id to -1
673
+ /// </summary>
674
+ /// <param name="withoutAssetNames"></param>
621
675
public static void HideAllAndExcluded ( params string [ ] withoutAssetNames )
622
676
{
623
- SRManager . GetInstance ( ) . HideAll ( true , withoutAssetNames ) ;
677
+ SRManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , true , withoutAssetNames ) ;
624
678
}
625
679
626
680
public static void HideAllAndExcluded ( int groupId , params string [ ] withoutAssetNames )
0 commit comments