@@ -12,6 +12,11 @@ namespace OxGFrame.CoreFrame
1212{
1313 public static class CoreFrames
1414 {
15+ /// <summary>
16+ /// Default group id
17+ /// </summary>
18+ internal const int DEFAULT_GROUP_ID = 0 ;
19+
1520 public static class UIFrame
1621 {
1722 public static bool ignoreTimeScale
@@ -200,6 +205,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
200205 #region Show
201206 /// <summary>
202207 /// If use prefix "res#" will load from resources else will load from bundle
208+ /// <para>Default group id is 0</para>
203209 /// </summary>
204210 /// <param name="assetName"></param>
205211 /// <param name="data"></param>
@@ -211,12 +217,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
211217 public static async UniTask < UIBase > Show ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
212218 {
213219 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 ) ;
215221 }
216222
217223 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 )
218224 {
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 ) ;
220226 }
221227
222228 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
233239 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
234240 {
235241 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 ;
237243 }
238244
239245 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
240246 {
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 ;
242248 }
243249
244250 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
259265 UIManager . GetInstance ( ) . Close ( assetName , disabledPreClose , forceDestroy ) ;
260266 }
261267
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>
262274 public static void CloseAll ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
263275 {
264- UIManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
276+ UIManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
265277 }
266278
267279 public static void CloseAll ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
268280 {
269281 UIManager . GetInstance ( ) . CloseAll ( groupId , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
270282 }
271283
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>
272290 public static void CloseAllAndExcluded ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
273291 {
274- UIManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
292+ UIManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
275293 }
276294
277295 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
287305 /// <param name="forceDestroy"></param>
288306 public static void CloseStackByStack ( string canvasName , bool disabledPreClose = false , bool forceDestroy = false )
289307 {
290- UIManager . GetInstance ( ) . CloseStackByStack ( 0 , canvasName , disabledPreClose , forceDestroy ) ;
308+ UIManager . GetInstance ( ) . CloseStackByStack ( DEFAULT_GROUP_ID , canvasName , disabledPreClose , forceDestroy ) ;
291309 }
292310
293311 /// <summary>
@@ -309,9 +327,12 @@ public static void Reveal(string assetName)
309327 UIManager . GetInstance ( ) . Reveal ( assetName ) ;
310328 }
311329
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>
312333 public static void RevealAll ( )
313334 {
314- UIManager . GetInstance ( ) . RevealAll ( ) ;
335+ UIManager . GetInstance ( ) . RevealAll ( DEFAULT_GROUP_ID ) ;
315336 }
316337
317338 public static void RevealAll ( int groupId )
@@ -326,19 +347,27 @@ public static void Hide(string assetName)
326347 UIManager . GetInstance ( ) . Hide ( assetName ) ;
327348 }
328349
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>
329354 public static void HideAll ( params string [ ] withoutAssetNames )
330355 {
331- UIManager . GetInstance ( ) . HideAll ( false , withoutAssetNames ) ;
356+ UIManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , false , withoutAssetNames ) ;
332357 }
333358
334359 public static void HideAll ( int groupId , params string [ ] withoutAssetNames )
335360 {
336361 UIManager . GetInstance ( ) . HideAll ( groupId , false , withoutAssetNames ) ;
337362 }
338363
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>
339368 public static void HideAllAndExcluded ( params string [ ] withoutAssetNames )
340369 {
341- UIManager . GetInstance ( ) . HideAll ( true , withoutAssetNames ) ;
370+ UIManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , true , withoutAssetNames ) ;
342371 }
343372
344373 public static void HideAllAndExcluded ( int groupId , params string [ ] withoutAssetNames )
@@ -505,6 +534,7 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
505534 #region Show
506535 /// <summary>
507536 /// If use prefix "res#" will load from resources else will load from bundle
537+ /// <para>Default group id is 0</para>
508538 /// </summary>
509539 /// <param name="assetName"></param>
510540 /// <param name="data"></param>
@@ -516,12 +546,12 @@ public static async UniTask Preload(string packageName, string[] assetNames, uin
516546 public static async UniTask < SRBase > Show ( string assetName , object data = null , string awaitingUIAssetName = null , uint priority = 0 , Progression progression = null , Transform parent = null )
517547 {
518548 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 ) ;
520550 }
521551
522552 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 )
523553 {
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 ) ;
525555 }
526556
527557 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
538568 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
539569 {
540570 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 ;
542572 }
543573
544574 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
545575 {
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 ;
547577 }
548578
549579 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
564594 SRManager . GetInstance ( ) . Close ( assetName , disabledPreClose , forceDestroy ) ;
565595 }
566596
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>
567603 public static void CloseAll ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
568604 {
569- SRManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
605+ SRManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
570606 }
571607
572608 public static void CloseAll ( int groupId , bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
573609 {
574610 SRManager . GetInstance ( ) . CloseAll ( groupId , disabledPreClose , forceDestroy , false , withoutAssetNames ) ;
575611 }
576612
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>
577619 public static void CloseAllAndExcluded ( bool disabledPreClose = false , bool forceDestroy = false , params string [ ] withoutAssetNames )
578620 {
579- SRManager . GetInstance ( ) . CloseAll ( disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
621+ SRManager . GetInstance ( ) . CloseAll ( DEFAULT_GROUP_ID , disabledPreClose , forceDestroy , true , withoutAssetNames ) ;
580622 }
581623
582624 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)
591633 SRManager . GetInstance ( ) . Reveal ( assetName ) ;
592634 }
593635
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>
594639 public static void RevealAll ( )
595640 {
596- SRManager . GetInstance ( ) . RevealAll ( ) ;
641+ SRManager . GetInstance ( ) . RevealAll ( DEFAULT_GROUP_ID ) ;
597642 }
598643
599644 public static void RevealAll ( int groupId )
@@ -610,17 +655,26 @@ public static void Hide(string assetName)
610655
611656 public static void HideAll ( params string [ ] withoutAssetNames )
612657 {
613- SRManager . GetInstance ( ) . HideAll ( false , withoutAssetNames ) ;
658+ SRManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , false , withoutAssetNames ) ;
614659 }
615660
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>
616666 public static void HideAll ( int groupId , params string [ ] withoutAssetNames )
617667 {
618668 SRManager . GetInstance ( ) . HideAll ( groupId , false , withoutAssetNames ) ;
619669 }
620670
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>
621675 public static void HideAllAndExcluded ( params string [ ] withoutAssetNames )
622676 {
623- SRManager . GetInstance ( ) . HideAll ( true , withoutAssetNames ) ;
677+ SRManager . GetInstance ( ) . HideAll ( DEFAULT_GROUP_ID , true , withoutAssetNames ) ;
624678 }
625679
626680 public static void HideAllAndExcluded ( int groupId , params string [ ] withoutAssetNames )
0 commit comments