11using UnityEditor ;
2+ using UnityEngine ;
23using UnityEditor . IMGUI . Controls ;
34using System . Collections . Generic ;
45using System . IO ;
56using System . Runtime . Serialization . Formatters . Binary ;
67using System . Linq ;
78
8- namespace UnityEngine . AssetBundles
9+ namespace AssetBundleBrowser
910{
1011 [ System . Serializable ]
11- public class AssetBundleInspectTab
12+ internal class AssetBundleInspectTab
1213 {
1314 Rect m_Position ;
1415 [ SerializeField ]
@@ -23,7 +24,7 @@ public class AssetBundleInspectTab
2324 [ SerializeField ]
2425 private TreeViewState m_BundleTreeState ;
2526
26- public Editor m_Editor = null ;
27+ internal Editor m_Editor = null ;
2728
2829 private SingleBundleInspector m_SingleInspector ;
2930
@@ -52,14 +53,14 @@ private AssetBundleRecord GetLoadedBundleRecordByName(string bundleName)
5253 return m_loadedAssetBundles [ bundleName ] ;
5354 }
5455
55- public AssetBundleInspectTab ( )
56+ internal AssetBundleInspectTab ( )
5657 {
5758 m_BundleList = new Dictionary < string , List < string > > ( ) ;
5859 m_SingleInspector = new SingleBundleInspector ( ) ;
5960 m_loadedAssetBundles = new Dictionary < string , AssetBundleRecord > ( ) ;
6061 }
6162
62- public void OnEnable ( Rect pos , EditorWindow parent )
63+ internal void OnEnable ( Rect pos , EditorWindow parent )
6364 {
6465 m_Position = pos ;
6566 if ( m_Data == null )
@@ -92,7 +93,7 @@ public void OnEnable(Rect pos, EditorWindow parent)
9293 RefreshBundles ( ) ;
9394 }
9495
95- public void OnDisable ( )
96+ internal void OnDisable ( )
9697 {
9798 ClearData ( ) ;
9899
@@ -107,7 +108,7 @@ public void OnDisable()
107108 file . Close ( ) ;
108109 }
109110
110- public void OnGUI ( Rect pos )
111+ internal void OnGUI ( Rect pos )
111112 {
112113 m_Position = pos ;
113114
@@ -152,12 +153,12 @@ private void OnGUIEditor()
152153 }
153154 }
154155
155- public void RemoveBundlePath ( string pathToRemove )
156+ internal void RemoveBundlePath ( string pathToRemove )
156157 {
157158 UnloadBundle ( pathToRemove ) ;
158159 m_Data . RemovePath ( pathToRemove ) ;
159160 }
160- public void RemoveBundleFolder ( string pathToRemove )
161+ internal void RemoveBundleFolder ( string pathToRemove )
161162 {
162163 List < string > paths = null ;
163164 if ( m_BundleList . TryGetValue ( pathToRemove , out paths ) )
@@ -203,7 +204,7 @@ private void BrowseForFolder(string folderPath = null)
203204 }
204205 }
205206
206- public void AddBundleFolder ( string folderPath )
207+ internal void AddBundleFolder ( string folderPath )
207208 {
208209 m_Data . AddFolder ( folderPath ) ;
209210 }
@@ -224,7 +225,7 @@ private void ClearData()
224225 }
225226 }
226227
227- public void RefreshBundles ( )
228+ internal void RefreshBundles ( )
228229 {
229230 ClearData ( ) ;
230231
@@ -310,11 +311,11 @@ private void AddFilePathToList(string rootPath, string path)
310311 }
311312 }
312313
313- public Dictionary < string , List < string > > BundleList
314+ internal Dictionary < string , List < string > > BundleList
314315 { get { return m_BundleList ; } }
315316
316317
317- public void SetBundleItem ( IList < InspectTreeItem > selected )
318+ internal void SetBundleItem ( IList < InspectTreeItem > selected )
318319 {
319320 //m_SelectedBundleTreeItems = selected;
320321 if ( selected == null || selected . Count == 0 || selected [ 0 ] == null )
@@ -342,17 +343,17 @@ public void SetBundleItem(IList<InspectTreeItem> selected)
342343 }
343344
344345 [ System . Serializable ]
345- public class InspectTabData
346+ internal class InspectTabData
346347 {
347348 [ SerializeField ]
348349 private List < string > m_BundlePaths = new List < string > ( ) ;
349350 [ SerializeField ]
350351 private List < BundleFolderData > m_BundleFolders = new List < BundleFolderData > ( ) ;
351352
352- public IList < string > BundlePaths { get { return m_BundlePaths . AsReadOnly ( ) ; } }
353- public IList < BundleFolderData > BundleFolders { get { return m_BundleFolders . AsReadOnly ( ) ; } }
353+ internal IList < string > BundlePaths { get { return m_BundlePaths . AsReadOnly ( ) ; } }
354+ internal IList < BundleFolderData > BundleFolders { get { return m_BundleFolders . AsReadOnly ( ) ; } }
354355
355- public void AddPath ( string newPath )
356+ internal void AddPath ( string newPath )
356357 {
357358 if ( ! m_BundlePaths . Contains ( newPath ) )
358359 {
@@ -368,29 +369,29 @@ public void AddPath(string newPath)
368369 }
369370 }
370371
371- public void AddFolder ( string newPath )
372+ internal void AddFolder ( string newPath )
372373 {
373374 if ( ! BundleFolderContains ( newPath ) )
374375 m_BundleFolders . Add ( new BundleFolderData ( newPath ) ) ;
375376 }
376377
377- public void RemovePath ( string pathToRemove )
378+ internal void RemovePath ( string pathToRemove )
378379 {
379380 m_BundlePaths . Remove ( pathToRemove ) ;
380381 }
381382
382- public void RemoveFolder ( string pathToRemove )
383+ internal void RemoveFolder ( string pathToRemove )
383384 {
384385 m_BundleFolders . Remove ( BundleFolders . FirstOrDefault ( bfd => bfd . Path == pathToRemove ) ) ;
385386 }
386387
387- public bool FolderIgnoresFile ( string folderPath , string filePath )
388+ internal bool FolderIgnoresFile ( string folderPath , string filePath )
388389 {
389390 var bundleFolderData = BundleFolders . FirstOrDefault ( bfd => bfd . Path == folderPath ) ;
390391 return bundleFolderData != null && bundleFolderData . IgnoredFiles . Contains ( filePath ) ;
391392 }
392393
393- public BundleFolderData FolderDataContainingFilePath ( string filePath )
394+ internal BundleFolderData FolderDataContainingFilePath ( string filePath )
394395 {
395396 foreach ( var bundleFolderData in BundleFolders )
396397 {
@@ -415,13 +416,13 @@ private bool BundleFolderContains(string folderPath)
415416 }
416417
417418 [ System . Serializable ]
418- public class BundleFolderData
419+ internal class BundleFolderData
419420 {
420- public string Path ;
421+ internal string Path ;
421422
422- public IList < string > IgnoredFiles ;
423+ internal IList < string > IgnoredFiles ;
423424
424- public BundleFolderData ( string path )
425+ internal BundleFolderData ( string path )
425426 {
426427 Path = path ;
427428 IgnoredFiles = new List < string > ( ) ;
0 commit comments