@@ -18,9 +18,9 @@ internal class AssetPageEditConfig : IAssetPage
18
18
public AssetPageEditConfig ( )
19
19
{
20
20
GC_Select = GEContent . NewSetting ( "ic_Eyes" , "选择资源配置文件" ) ;
21
- GC_SAVE = GEContent . NewBuiltin ( "d_SaveAs" , "保存" ) ;
22
- Data = AssetCollectRoot . GetOrCreate ( ) ;
23
- Config = ASConfig . GetOrCreate ( ) ;
21
+ GC_SAVE = GEContent . NewBuiltin ( "d_SaveAs" , "保存" ) ;
22
+ Data = AssetCollectRoot . GetOrCreate ( ) ;
23
+ Config = ASConfig . GetOrCreate ( ) ;
24
24
25
25
26
26
ViewConfig = new ViewRect ( 550 , 1 )
@@ -35,9 +35,9 @@ public AssetPageEditConfig()
35
35
36
36
public void Dispose ( )
37
37
{
38
- Data = null ;
39
- Config = null ;
40
- GC_SAVE = null ;
38
+ Data = null ;
39
+ Config = null ;
40
+ GC_SAVE = null ;
41
41
GC_Select = null ;
42
42
}
43
43
@@ -299,116 +299,115 @@ private void OnDrawASConfig(Rect rect)
299
299
cell . y += cell . height ;
300
300
cell . x = rect . x + 10 ;
301
301
cell . width = rect . width - cell . x ;
302
- GUI . Label ( cell ,
302
+ GUI . Label ( cell , string . Format ( "运行时 : {0}/{1}" ,
303
303
#if UNITY_ANDROID
304
- $ "运行时 : Application.persistentDataPath/ { Config . RuntimeRootDirectory } "
304
+ " Application.persistentDataPath"
305
305
#elif UNITY_STANDALONE_WIN
306
- $ "运行时 : Application.streamingAssetsPath/ { Config . RuntimeRootDirectory } "
306
+ " Application.streamingAssetsPath"
307
307
#elif UNITY_IPHONE || UNITY_IOS
308
- $ "运行时 : Application.persistentDataPath/ { Config . RuntimeRootDirectory } "
308
+ " Application.persistentDataPath"
309
309
#elif UNITY_WEBGL
310
- $ "运行时 : Application.persistentDataPath/{ Config . RuntimeRootDirectory } "
310
+ "Application.persistentDataPath"
311
+ #else
312
+ "Not Support"
311
313
#endif
312
- , GEStyle . HeaderLabel ) ;
314
+ , Config . RuntimeRootDirectory ) , GEStyle . HeaderLabel ) ;
313
315
}
314
-
315
- if ( string . IsNullOrEmpty ( Config . RuntimeRootDirectory ) ) GUI . enabled = false ;
316
-
317
- switch ( Config . ASMode )
316
+ using ( new EditorGUI . DisabledGroupScope ( string . IsNullOrEmpty ( Config . RuntimeRootDirectory ) ) )
318
317
{
319
- case EASMode . Remote :
318
+ switch ( Config . ASMode )
320
319
{
320
+ case EASMode . Remote :
321
321
{
322
- cell . y += cell . height ;
323
- cell . x = rect . x + 10 ;
324
- cell . width = 150 ;
325
- GUI . Label ( cell , "远端资源地址" , GEStyle . HeaderLabel ) ;
326
- }
327
- using ( new EditorGUI . DisabledGroupScope ( string . IsNullOrEmpty ( Config . URL ) ) )
328
- {
329
- cell . width = 100 ;
330
- cell . x = rect . width - cell . width ;
331
- if ( GUI . Button ( cell , "跳转首包清单" , GEStyle . toolbarbutton ) )
332
322
{
333
- AssetWindow . OpenPage < AssetPageLook . FirstPackage > ( ) ;
334
- GUI . FocusControl ( null ) ;
323
+ cell . y += cell . height ;
324
+ cell . x = rect . x + 10 ;
325
+ cell . width = 150 ;
326
+ GUI . Label ( cell , "远端资源地址" , GEStyle . HeaderLabel ) ;
327
+ }
328
+ using ( new EditorGUI . DisabledGroupScope ( string . IsNullOrEmpty ( Config . URL ) ) )
329
+ {
330
+ cell . width = 100 ;
331
+ cell . x = rect . width - cell . width ;
332
+ if ( GUI . Button ( cell , "跳转首包清单" , GEStyle . toolbarbutton ) )
333
+ {
334
+ AssetWindow . OpenPage < AssetPageLook . FirstPackage > ( ) ;
335
+ GUI . FocusControl ( null ) ;
336
+ }
337
+
338
+ cell . width = 100 ;
339
+ cell . x -= cell . width ;
340
+ if ( GUI . Button ( cell , "打开远端网页" , GEStyle . toolbarbutton ) )
341
+ {
342
+ Application . OpenURL ( Config . URL ) ;
343
+ GUI . FocusControl ( null ) ;
344
+ }
335
345
}
336
346
337
- cell . width = 100 ;
338
- cell . x -= cell . width ;
339
- if ( GUI . Button ( cell , "打开远端网页" , GEStyle . toolbarbutton ) )
340
347
{
341
- Application . OpenURL ( Config . URL ) ;
342
- GUI . FocusControl ( null ) ;
348
+ cell . y += cell . height ;
349
+ cell . x = rect . x + 10 ;
350
+ cell . width = rect . width - cell . x ;
351
+ cell . height = 50 ;
352
+ Config . URL = GUI . TextArea ( cell , Config . URL ) ;
343
353
}
344
- }
345
354
346
- {
347
- cell . y += cell . height ;
348
- cell . x = rect . x + 10 ;
349
- cell . width = rect . width - cell . x ;
350
- cell . height = 50 ;
351
- Config . URL = GUI . TextArea ( cell , Config . URL ) ;
352
- }
355
+ {
356
+ cell . y += cell . height ;
357
+ cell . x = rect . x + 10 ;
358
+ cell . width = 150 ;
359
+ cell . height = 20 ;
360
+ GUI . Label ( cell , "下载失败尝试次数" , GEStyle . HeaderLabel ) ;
361
+ cell . x += cell . width ;
362
+ cell . width = rect . width - cell . x ;
363
+ Config . DownloadFailedTryAgain = EditorGUI . IntSlider ( cell , Config . DownloadFailedTryAgain , 3 , 36 ) ;
364
+ }
353
365
354
- {
355
- cell . y += cell . height ;
356
- cell . x = rect . x + 10 ;
357
- cell . width = 150 ;
358
- cell . height = 20 ;
359
- GUI . Label ( cell , "下载失败尝试次数" , GEStyle . HeaderLabel ) ;
360
- cell . x += cell . width ;
361
- cell . width = rect . width - cell . x ;
362
- Config . DownloadFailedTryAgain = EditorGUI . IntSlider ( cell , Config . DownloadFailedTryAgain , 3 , 36 ) ;
363
- }
366
+ {
367
+ cell . y += cell . height ;
368
+ cell . x = rect . x + 10 ;
369
+ cell . width = 150 ;
370
+ GUI . Label ( cell , "资源加载的最大数量" , GEStyle . HeaderLabel ) ;
371
+ cell . x += cell . width ;
372
+ cell . width = rect . width - cell . x ;
373
+ Config . LoadingMaxTimeSlice = EditorGUI . IntSlider ( cell , Config . LoadingMaxTimeSlice , 144 , 8192 ) ;
374
+ }
364
375
365
- {
366
- cell . y += cell . height ;
367
- cell . x = rect . x + 10 ;
368
- cell . width = 150 ;
369
- GUI . Label ( cell , "资源加载的最大数量 " , GEStyle . HeaderLabel ) ;
370
- cell . x += cell . width ;
371
- cell . width = rect . width - cell . x ;
372
- Config . LoadingMaxTimeSlice = EditorGUI . IntSlider ( cell , Config . LoadingMaxTimeSlice , 144 , 8192 ) ;
373
- }
376
+ {
377
+ cell . y += cell . height ;
378
+ cell . x = rect . x + 10 ;
379
+ cell . width = 150 ;
380
+ GUI . Label ( cell , "请求超时时间 " , GEStyle . HeaderLabel ) ;
381
+ cell . x += cell . width ;
382
+ cell . width = rect . width - cell . x ;
383
+ Config . Timeout = EditorGUI . IntSlider ( cell , Config . Timeout , 3 , 180 ) ;
384
+ }
374
385
375
- {
376
- cell . y += cell . height ;
377
- cell . x = rect . x + 10 ;
378
- cell . width = 150 ;
379
- GUI . Label ( cell , "请求超时时间" , GEStyle . HeaderLabel ) ;
380
- cell . x += cell . width ;
381
- cell . width = rect . width - cell . x ;
382
- Config . Timeout = EditorGUI . IntSlider ( cell , Config . Timeout , 3 , 180 ) ;
386
+ break ;
383
387
}
384
-
385
- if ( string . IsNullOrEmpty ( Config . URL ) ) GUI . enabled = true ;
386
- break ;
387
- }
388
- default :
389
- using ( new EditorGUI . DisabledGroupScope ( false ) )
390
- {
391
- cell . y += cell . height ;
392
- cell . x = rect . x + 10 ;
393
- cell . width = 150 ;
394
- GUI . Label ( cell , "资源包配置" , GEStyle . HeaderLabel ) ;
395
- foreach ( var config in Config . Packages )
388
+ default :
389
+ using ( new EditorGUI . DisabledGroupScope ( true ) )
396
390
{
397
391
cell . y += cell . height ;
398
392
cell . x = rect . x + 10 ;
399
- cell . width = rect . width - 20 - cell . x ;
400
- GUI . Label ( cell , config . Name , GEStyle . HeaderLabel ) ;
401
-
402
- cell . x += cell . width ;
403
- cell . width = 20 ;
404
- config . IsDefault = GUI . Toggle ( cell , config . IsDefault , "" ) ;
393
+ cell . width = 150 ;
394
+ GUI . Label ( cell , "资源包配置" , GEStyle . HeaderLabel ) ;
395
+ foreach ( var config in Config . Packages )
396
+ {
397
+ cell . y += cell . height ;
398
+ cell . x = rect . x + 10 ;
399
+ cell . width = rect . width - 20 - cell . x ;
400
+ GUI . Label ( cell , config . Name , GEStyle . HeaderLabel ) ;
401
+
402
+ cell . x += cell . width ;
403
+ cell . width = 20 ;
404
+ config . IsDefault = GUI . Toggle ( cell , config . IsDefault , "" ) ;
405
+ }
405
406
}
406
- }
407
407
408
- break ;
408
+ break ;
409
+ }
409
410
}
410
-
411
- if ( string . IsNullOrEmpty ( Config . RuntimeRootDirectory ) ) GUI . enabled = true ;
412
411
}
413
412
}
414
413
}
0 commit comments