@@ -259,14 +259,14 @@ internal void RefreshBundles()
259259
260260 foreach ( var folder in m_Data . BundleFolders )
261261 {
262- if ( Directory . Exists ( folder . Path ) )
262+ if ( Directory . Exists ( folder . path ) )
263263 {
264- AddFilePathToList ( folder . Path , folder . Path ) ;
264+ AddFilePathToList ( folder . path , folder . path ) ;
265265 }
266266 else
267267 {
268268 Debug . Log ( "Expected folder not found: " + folder ) ;
269- pathsToRemove . Add ( folder . Path ) ;
269+ pathsToRemove . Add ( folder . path ) ;
270270 }
271271 }
272272 foreach ( var path in pathsToRemove )
@@ -364,7 +364,7 @@ internal void AddPath(string newPath)
364364 }
365365 else
366366 {
367- possibleFolderData . IgnoredFiles . Remove ( newPath ) ;
367+ possibleFolderData . ignoredFiles . Remove ( newPath ) ;
368368 }
369369 }
370370 }
@@ -382,20 +382,22 @@ internal void RemovePath(string pathToRemove)
382382
383383 internal void RemoveFolder ( string pathToRemove )
384384 {
385- m_BundleFolders . Remove ( BundleFolders . FirstOrDefault ( bfd => bfd . Path == pathToRemove ) ) ;
385+ m_BundleFolders . Remove ( BundleFolders . FirstOrDefault ( bfd => bfd . path == pathToRemove ) ) ;
386386 }
387387
388388 internal bool FolderIgnoresFile ( string folderPath , string filePath )
389389 {
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 ) ;
392394 }
393395
394396 internal BundleFolderData FolderDataContainingFilePath ( string filePath )
395397 {
396398 foreach ( var bundleFolderData in BundleFolders )
397399 {
398- if ( Path . GetFullPath ( filePath ) . StartsWith ( Path . GetFullPath ( bundleFolderData . Path ) ) )
400+ if ( Path . GetFullPath ( filePath ) . StartsWith ( Path . GetFullPath ( bundleFolderData . path ) ) )
399401 {
400402 return bundleFolderData ;
401403 }
@@ -407,7 +409,7 @@ private bool BundleFolderContains(string folderPath)
407409 {
408410 foreach ( var bundleFolderData in BundleFolders )
409411 {
410- if ( Path . GetFullPath ( bundleFolderData . Path ) == Path . GetFullPath ( folderPath ) )
412+ if ( Path . GetFullPath ( bundleFolderData . path ) == Path . GetFullPath ( folderPath ) )
411413 {
412414 return true ;
413415 }
@@ -418,14 +420,24 @@ private bool BundleFolderContains(string folderPath)
418420 [ System . Serializable ]
419421 internal class BundleFolderData
420422 {
421- internal string Path ;
423+ [ SerializeField ]
424+ internal string path ;
422425
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+ }
424437
425- internal BundleFolderData ( string path )
438+ internal BundleFolderData ( string p )
426439 {
427- Path = path ;
428- IgnoredFiles = new List < string > ( ) ;
440+ path = p ;
429441 }
430442 }
431443 }
0 commit comments