public static void BuildAssetBundles(BuildTarget target) { AutoGenR.SearchAllAndGen(); // Choose the output path according to the build target. var outputPath = CreateAssetBundleDirectory(); var options = BuildAssetBundleOptions.None; var shouldCheckODR = target == BuildTarget.iOS; #if UNITY_TVOS shouldCheckODR |= target == BuildTarget.tvOS; #endif if (shouldCheckODR) { #if ENABLE_IOS_ON_DEMAND_RESOURCES if (PlayerSettings.iOS.useOnDemandResources) { options |= BuildAssetBundleOptions.UncompressedAssetBundle; } #endif #if ENABLE_IOS_APP_SLICING options |= BuildAssetBundleOptions.UncompressedAssetBundle; #endif } //@TODO: use append hash... (Make sure pipeline works correctly with it.) //options |= BuildAssetBundleOptions.DryRunBuild; options |= BuildAssetBundleOptions.ForceRebuildAssetBundle; //options |= BuildAssetBundleOptions.AppendHashToAssetBundleName; options |= BuildAssetBundleOptions.StrictMode; BuildPipeline.BuildAssetBundles(outputPath, options, target); }
public static void SearchAllAndGen() { var u = new AutoGenR(new ConfigAutoGen(), new TextureAutoGen(), new AudioAutoGen(), new PrefabAutoGen(), new LanguageAutoGen(), new ShaderAutoGen()); u.SearchAll(); u.GenRClass(); u.GenRInfo(); }