public AssetBundleAnalyzerController(AssetBundleCollection assetBundleCollection)
        {
            m_AssetBundleCollection = (assetBundleCollection != null ? assetBundleCollection : new AssetBundleCollection());

            m_AssetBundleCollection.OnLoadingAssetBundle += delegate(int index, int count)
            {
                if (OnLoadingAssetBundle != null)
                {
                    OnLoadingAssetBundle(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadingAsset += delegate(int index, int count)
            {
                if (OnLoadingAsset != null)
                {
                    OnLoadingAsset(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadCompleted += delegate()
            {
                if (OnLoadCompleted != null)
                {
                    OnLoadCompleted();
                }
            };

            m_DependencyDatas         = new Dictionary <string, DependencyData>();
            m_ScatteredAssets         = new Dictionary <string, List <Asset> >();
            m_AnalyzedStamps          = new HashSet <Stamp>();
            m_CircularDependencyDatas = new List <string[]>();
        }
示例#2
0
        public AssetBundleEditorController()
        {
            m_ConfigurationPath = Type.GetConfigurationPath <AssetBundleEditorConfigPathAttribute>() ?? Icarus.GameFramework.Utility.Path.GetCombinePath(Application.dataPath, "GameFramework/Configs/AssetBundleEditor.xml");

            m_AssetBundleCollection = new AssetBundleCollection();

            m_AssetBundleCollection.OnLoadingAssetBundle += delegate(int index, int count)
            {
                if (OnLoadingAssetBundle != null)
                {
                    OnLoadingAssetBundle(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadingAsset += delegate(int index, int count)
            {
                if (OnLoadingAsset != null)
                {
                    OnLoadingAsset(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadCompleted += delegate()
            {
                if (OnLoadCompleted != null)
                {
                    OnLoadCompleted();
                }
            };

            m_SourceAssetSearchPaths         = new List <string>();
            m_SourceAssetSearchRelativePaths = new List <string>();
            m_SourceAssets                 = new Dictionary <string, SourceAsset>();
            m_SourceAssetRoot              = null;
            m_SourceAssetRootPath          = null;
            m_SourceAssetUnionTypeFilter   = null;
            m_SourceAssetUnionLabelFilter  = null;
            m_SourceAssetExceptTypeFilter  = null;
            m_SourceAssetExceptLabelFilter = null;
            m_AssetSorter = AssetSorterType.Path;

            SourceAssetRootPath = DefaultSourceAssetRootPath;
        }
        public AssetBundleBuilderController()
        {
            m_ConfigurationPath = Type.GetConfigurationPath <AssetBundleBuilderConfigPathAttribute>() ?? Icarus.GameFramework.Utility.Path.GetCombinePath(Application.dataPath, "GameFramework/Configs/AssetBundleBuilder.xml");

            m_AssetBundleCollection = new AssetBundleCollection();

            m_AssetBundleCollection.OnLoadingAssetBundle += delegate(int index, int count)
            {
                if (OnLoadingAssetBundle != null)
                {
                    OnLoadingAssetBundle(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadingAsset += delegate(int index, int count)
            {
                if (OnLoadingAsset != null)
                {
                    OnLoadingAsset(index, count);
                }
            };

            m_AssetBundleCollection.OnLoadCompleted += delegate()
            {
                if (OnLoadCompleted != null)
                {
                    OnLoadCompleted();
                }
            };

            m_AssetBundleAnalyzerController = new AssetBundleAnalyzerController(m_AssetBundleCollection);

            m_AssetBundleAnalyzerController.OnAnalyzingAsset += delegate(int index, int count)
            {
                if (OnAnalyzingAsset != null)
                {
                    OnAnalyzingAsset(index, count);
                }
            };

            m_AssetBundleAnalyzerController.OnAnalyzeCompleted += delegate()
            {
                if (OnAnalyzeCompleted != null)
                {
                    OnAnalyzeCompleted();
                }
            };

            m_AssetBundleDatas = new SortedDictionary <string, AssetBundleData>();
            m_BuildReport      = new BuildReport();

            m_BuildEventHandlerTypeNames = new List <string>();
            m_BuildEventHandlerTypeNames.Add(NoneOptionName);
            m_BuildEventHandlerTypeNames.AddRange(Type.GetEditorTypeNames(typeof(IBuildEventHandler)));
            m_BuildEventHandler = null;

            WindowsSelected = MacOSXSelected = IOSSelected = AndroidSelected = WindowsStoreSelected = true;
            RecordScatteredDependencyAssetsSelected = false;
            DeterministicAssetBundleSelected        = ChunkBasedCompressionSelected = true;
            UncompressedAssetBundleSelected         = DisableWriteTypeTreeSelected = ForceRebuildAssetBundleSelected = IgnoreTypeTreeChangesSelected = AppendHashToAssetBundleNameSelected = false;
            BuildEventHandlerTypeName = string.Empty;
            OutputDirectory           = string.Empty;
        }