CreateAssetBundles.cs 552 B

1234567891011121314151617181920
  1. using UnityEditor;
  2. using UnityEngine;
  3. public class CreateAssetBundles
  4. {
  5. [MenuItem("Assets/Build AssetBundles Android")]
  6. static void BuildAllAssetBundles()
  7. {
  8. BuildPipeline.BuildAssetBundles("AssetBundles", BuildAssetBundleOptions.ForceRebuildAssetBundle
  9. , BuildTarget.Android);
  10. }
  11. [MenuItem("Assets/Build AssetBundles IOS")]
  12. static void BuildAllAssetBundlesIOS()
  13. {
  14. BuildPipeline.BuildAssetBundles("AssetBundles", BuildAssetBundleOptions.ForceRebuildAssetBundle
  15. , BuildTarget.iOS);
  16. }
  17. }