Example #1
0
        static IEnumerable <IAsset> GetAllAssets(Bundle bundle)
        {
            var collector = new AssetCollector();

            bundle.Accept(collector);
            return(collector.Assets);
        }
Example #2
0
    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();
    }
Example #3
0
 private static void ClearTag()
 {
     AssetCollector.AllClearTag();
 }
Example #4
0
 private static void SetTag()
 {
     AssetCollector.Collecttions(XGamePath.GetResRoot());
     AssetCollector.AllSetTag();
 }