@@ -259,14 +259,14 @@ internal void RefreshBundles()
259
259
260
260
foreach ( var folder in m_Data . BundleFolders )
261
261
{
262
- if ( Directory . Exists ( folder . Path ) )
262
+ if ( Directory . Exists ( folder . path ) )
263
263
{
264
- AddFilePathToList ( folder . Path , folder . Path ) ;
264
+ AddFilePathToList ( folder . path , folder . path ) ;
265
265
}
266
266
else
267
267
{
268
268
Debug . Log ( "Expected folder not found: " + folder ) ;
269
- pathsToRemove . Add ( folder . Path ) ;
269
+ pathsToRemove . Add ( folder . path ) ;
270
270
}
271
271
}
272
272
foreach ( var path in pathsToRemove )
@@ -364,7 +364,7 @@ internal void AddPath(string newPath)
364
364
}
365
365
else
366
366
{
367
- possibleFolderData . IgnoredFiles . Remove ( newPath ) ;
367
+ possibleFolderData . ignoredFiles . Remove ( newPath ) ;
368
368
}
369
369
}
370
370
}
@@ -382,20 +382,22 @@ internal void RemovePath(string pathToRemove)
382
382
383
383
internal void RemoveFolder ( string pathToRemove )
384
384
{
385
- m_BundleFolders . Remove ( BundleFolders . FirstOrDefault ( bfd => bfd . Path == pathToRemove ) ) ;
385
+ m_BundleFolders . Remove ( BundleFolders . FirstOrDefault ( bfd => bfd . path == pathToRemove ) ) ;
386
386
}
387
387
388
388
internal bool FolderIgnoresFile ( string folderPath , string filePath )
389
389
{
390
- var bundleFolderData = BundleFolders . FirstOrDefault ( bfd => bfd . Path == folderPath ) ;
391
- return bundleFolderData != null && bundleFolderData . IgnoredFiles . Contains ( filePath ) ;
390
+ if ( BundleFolders == null )
391
+ return false ;
392
+ var bundleFolderData = BundleFolders . FirstOrDefault ( bfd => bfd . path == folderPath ) ;
393
+ return bundleFolderData != null && bundleFolderData . ignoredFiles . Contains ( filePath ) ;
392
394
}
393
395
394
396
internal BundleFolderData FolderDataContainingFilePath ( string filePath )
395
397
{
396
398
foreach ( var bundleFolderData in BundleFolders )
397
399
{
398
- if ( Path . GetFullPath ( filePath ) . StartsWith ( Path . GetFullPath ( bundleFolderData . Path ) ) )
400
+ if ( Path . GetFullPath ( filePath ) . StartsWith ( Path . GetFullPath ( bundleFolderData . path ) ) )
399
401
{
400
402
return bundleFolderData ;
401
403
}
@@ -407,7 +409,7 @@ private bool BundleFolderContains(string folderPath)
407
409
{
408
410
foreach ( var bundleFolderData in BundleFolders )
409
411
{
410
- if ( Path . GetFullPath ( bundleFolderData . Path ) == Path . GetFullPath ( folderPath ) )
412
+ if ( Path . GetFullPath ( bundleFolderData . path ) == Path . GetFullPath ( folderPath ) )
411
413
{
412
414
return true ;
413
415
}
@@ -418,14 +420,24 @@ private bool BundleFolderContains(string folderPath)
418
420
[ System . Serializable ]
419
421
internal class BundleFolderData
420
422
{
421
- internal string Path ;
423
+ [ SerializeField ]
424
+ internal string path ;
422
425
423
- internal IList < string > IgnoredFiles ;
426
+ [ SerializeField ]
427
+ private List < string > m_ignoredFiles ;
428
+ internal List < string > ignoredFiles
429
+ {
430
+ get
431
+ {
432
+ if ( m_ignoredFiles == null )
433
+ m_ignoredFiles = new List < string > ( ) ;
434
+ return m_ignoredFiles ;
435
+ }
436
+ }
424
437
425
- internal BundleFolderData ( string path )
438
+ internal BundleFolderData ( string p )
426
439
{
427
- Path = path ;
428
- IgnoredFiles = new List < string > ( ) ;
440
+ path = p ;
429
441
}
430
442
}
431
443
}
0 commit comments