コード例 #1
0
        private void OnEnable()
        {
            m_Controller = new AssetBundleAnalyzerController();
            m_Controller.OnLoadingAssetBundle += OnLoadingAssetBundle;
            m_Controller.OnLoadingAsset       += OnLoadingAsset;
            m_Controller.OnLoadCompleted      += OnLoadCompleted;
            m_Controller.OnAnalyzingAsset     += OnAnalyzingAsset;
            m_Controller.OnAnalyzeCompleted   += OnAnalyzeCompleted;

            m_Analyzed     = false;
            m_ToolbarIndex = 0;

            m_AssetCount                      = 0;
            m_CachedAssetNames                = null;
            m_SelectedAssetIndex              = -1;
            m_SelectedAssetName               = null;
            m_SelectedDependencyData          = new DependencyData();
            m_AssetsOrder                     = AssetsOrder.ScatteredDependencyAssetCountDesc;
            m_AssetsFilter                    = null;
            m_AssetsScroll                    = Vector2.zero;
            m_DependencyAssetBundlesScroll    = Vector2.zero;
            m_DependencyAssetsScroll          = Vector2.zero;
            m_ScatteredDependencyAssetsScroll = Vector2.zero;

            m_ScatteredAssetCount         = 0;
            m_CachedScatteredAssetNames   = null;
            m_SelectedScatteredAssetIndex = -1;
            m_SelectedScatteredAssetName  = null;
            m_SelectedHostAssets          = new Asset[] { };
            m_ScatteredAssetsOrder        = ScatteredAssetsOrder.HostAssetCountDesc;
            m_ScatteredAssetsFilter       = null;
            m_ScatteredAssetsScroll       = Vector2.zero;
            m_HostAssetsScroll            = Vector2.zero;

            m_CircularDependencyCount       = 0;
            m_CachedCircularDependencyDatas = null;
            m_CircularDependencyScroll      = Vector2.zero;
        }
コード例 #2
0
        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;
        }