michael811125 / FlappyBird_OxGFrame

use OxGFrame to make a flappy bird game.
4 stars 1 forks source link

Please Help - How to config bundle build map and build Asset Bundle to run on android device #1

Closed codingwatching closed 1 year ago

codingwatching commented 1 year ago

Hi @michael811125 I just found this project and trying to learn OxGFrame Could you please add some simple notes or some picture to demo how to create config and build bundle to run this example on android device using assets bundle mode Thank you so much!

michael811125 commented 1 year ago

of course, do you want chinese or english version? I can help you to update this demo in english. also if I am free I will add bundle version in this demo (you can try BundleDemo first in OxGFrame).

by the way, because i don't have time to prepare english readme for OxGFrame. sorry about that. (if I am free I will do it)

See here first bundle step flow:

  1. Build built-in bundles. if you don't have any bundle put in StreamingAssets just create a empty folder to generate [bcfg], and copy to StreamingAssets.
  2. Create a [burlcfg] and copy to StreamingAssets.
  3. basically, must including [bcfg] and [burlcfg] in StreamingAssets.
  4. if we finished above. we can build [Patch] prepare upload to Server.
  5. Build patch bundle use AssetBundleBrowserPluse (rename manifest called [emf] => default name, also you can change by you).
  6. When build finished. choose [Step 1.] from BundleDistributor on top (Encrypt your bundle).
  7. After encrypt. choose [Step 3.] and choose [Export And Config from Source Folder] (Export config and bundle).
  8. if finished 6 and 7, you can upload your files to Server.

Videos (temporary recorded video. the computer is a little lag leads to some video screen stuck)
OxGFrame AssetBundle Part 1 OxGFrame AssetBundle Part 2

michael811125 commented 1 year ago

you can use [BundleDemo] to try above steps (change android platform), whatever which platform just do same steps. if finished build you can build android app run it.

codingwatching commented 1 year ago

Hi, @michael811125 Thank you so much for such a detailed step! English tutorial is great for me, the Chinese version is also ok with google translate. I will try to follow your step and deploy the server to test. How about a simple config to only build assets bundle and run the apk on android without update [Patch]

If you can make a Bundle version in this demo, it also help me a lot!

Thank you so much and have nice weekend!

michael811125 commented 1 year ago

Thank you for your commented. this is a good idea "How about a simple config to only build assets bundle and run the apk on android without update [Patch]". because I didn't consider without update [Patch] (I will extend this idea without update for Bundle).

but I have an option for build all bundles and copy to StreamingAssets, that option is [Step 3. Bundle Config Generator] and operation type is [Generate Config To Source Folder And Only Exprot Same Config]. the option just upload same config to the server. actually It doesn't needs to update [Patch], but still needs to request the [bcfg] from the server.

michael811125 commented 1 year ago

@codingwatching I already release OxGFrame v1.7.0 (extend offline mode), you can check it out. thanks!!!

codingwatching commented 1 year ago

wow @michael811125 You update too fast Thank you so much! The Offline_Mode.zip build does not target the android platform so I can not test the demo on an android device. (I follow your help and deploy and real android and can pass the "Start Check" but when loading the bundle the log error is File's build target is 5) Could you please take note of how to build offline content like the Builtin folder for the Android target? Thank you so much

michael811125 commented 1 year ago

Hi, @codingwatching because that demo zip is build by win platform, you just use AssetBundle-Browser-Pluse and choose android to build again.

Screen Shot 01

Screen Shot 02

  1. after bundle build use [Bundle Cryptogram] and choose "HTXOR" to encrypt AB.
  2. after encrypt use [Bundle Config Generator] choose operation type is "Generate Config To Source Folder".
  3. after finished copy all files to StreamingAssets.
  4. finally, you can build your apk to run it.
codingwatching commented 1 year ago

@michael811125 Thank you so much! It works like a charm!