Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TVOS ODR AssetBundle.LoadFromFileAsync returns null with TestFlight

Discussion in 'iOS and tvOS' started by rrsimon, Nov 25, 2016.

  1. rrsimon

    rrsimon

    Joined:
    Apr 16, 2012
    Posts:
    27
    We are currently updating our TVOS version of our app for the first time and I'm getting a weird error when overwriting an App Store build with a TestFlight build. After the On-Demand Resources are done downloading in our intro scene, the AssetBundle.LoadFromFileAsync("res://" + bundlename) calls to load the downloaded asset bundles always return null. Is anyone else having this issue?

    It's very strange because if I just install the TestFlight build, the asset bundles will load properly after being downloaded. It's as if the "res://" + bundlename path is invalid when overwriting AppStore builds. What's frustrating is that I can't even reproduce this issue with Xcode attached and I have to use on-screen logs to figure out what is going on. Right now I am at a point where it's a Unity method that is failing and I can't figure out what is going on.

    I have also looked into some documentation and some samples are also using the "odr://" root path but it still won't load the asset bundles if I try to load from there.

    Here are a few test cases that I have tried:
    A
    1. Install AppStore build
    2. Download asset bundles
    3. Game loads fine
    4. Install TestFlight build
    5. Game crashes when loading asset bundles

    B
    1. Install TestFlight build
    2. Download asset bundles
    3. Game loads fine

    C
    1. Install AppStore build
    2. Install TestFlight build
    3. Download asset bundles
    4. Game crashes when loading asset bundles

    I even tried renaming all my asset bundles with completely new names in case new ODR tags were conflicting with old ones and I still can't load those new asset bundles.

    Any help would be nice because I'm really desperate right now. We don't want to force our users to reinstall our game and lose all progress in the process.