static IEnumerable <IAsset> GetAllAssets(Bundle bundle) { var collector = new AssetCollector(); bundle.Accept(collector); return(collector.Assets); }
private static void BuildAll() { AssetDatabase.Refresh(); if (Directory.Exists(XGamePath.OutputPath)) { Directory.Delete(XGamePath.OutputPath, true); } Directory.CreateDirectory(XGamePath.OutputPath); AssetDatabase.Refresh(); string path = XGamePath.GetResRoot();//Application.dataPath+ "/FakeResources/Prefabs/abtest";// AssetCollector.Collecttions(path); BinCollector.Collecttions(Application.dataPath + "/Data/", XGamePath.OutputPath); ShaderCollector.Collecttions(Application.dataPath + "/Shaders/"); var options = BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.DeterministicAssetBundle; BuildPipeline.BuildAssetBundles(XGamePath.OutputPath, options, EditorUserBuildSettings.activeBuildTarget); AssetDatabase.Refresh(); }
private static void ClearTag() { AssetCollector.AllClearTag(); }
private static void SetTag() { AssetCollector.Collecttions(XGamePath.GetResRoot()); AssetCollector.AllSetTag(); }