Hello everybody,

I'm trying to integrate Asset Bundles into ORK. Our source platform is Android/iOS. I've built Asset Bundle in a folder on my PC. Then I've registered a CDN (Content Delivery Network) with their Storage where I've put the bundle in a folder.

Now...I'm trying to put the URL of the CDN into the Defautl Asset Bundle Path - Persistent Data Path, but It can't load my asset bundle and I feel that I'm missing something here.

When I change the path to my C:\....\bundle folder, it can load them, but not from a URL, I keep getting red error that the 'archive file was not found'.

I've read that Persistent Data Path changes when it gets published on Android/iOS, so maybe that's the issue. Or do I need also some kind of "Downloader" that loads the data in a defined path so that they can be loaded then?

Any advice is very welcome,

Machal
  • Since you're targeting Android and iOS, I'd recommend using the Persistent Data Path for your asset bundles. I.e. your downloaded assets need to be stored in Application.persistentDataPath and your asset bundle path in ORK should be set to use Persistent Data Path.

    Application.persistentDataPath points do different paths depending on the platform, so that setup should be fine regardless of being on PC, Android or iOS, as your downloaded stuff should be saved there and ORK can access it from there as well.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2019
    Yes, figured it out. I've found a way to download them into the persistent data paths.

    However, it would be nice, If ORK can load assets based on part of the name, not full name.
    e.g. CombatantBundle-156963248931, so when I put 'CombatantBundle' ORK would just find it, ignoring symbols.

    In order to work most efficiently with asset bundles is, they should be generated with hashes, so the downloader and CDN recognize changes and we don't have to flush the cache every time we make changes.

    Can it be in a future update?
    Post edited by Machal on
  • I'll look into it - should be possible to search for the latest file starting with the defined name in the directory, unless android/iOS don't allow that kind of access.

    However, shouldn't the downloaded bundles replace the previous bundle, or you'd start to fill the user's phone with data?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited September 2019
    I've tried to search for part names for bundles but didn't work.

    That depends on the code. We have .json file that checks for manifest that checks for bundle sizes, so it rewrites them.

    One of the main issues is that we have to flush the CDN's cache and change manifest version every time there's any change in any bundle, because ORK needs exact bundle name
    Post edited by Machal on
Sign In or Register to comment.