Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[iOS] Loading Asset Bundles built in different Unity versions

Discussion in 'Asset Bundles' started by re-cheid, May 28, 2018.

  1. re-cheid

    re-cheid

    Joined:
    Apr 10, 2017
    Posts:
    9
    FollowUp of this Thread: https://forum.unity.com/threads/ass...hing-in-ios-app-built-with-2018-1-0f1.529241/

    There seems to be a problem when loading Asset Bundles built in different Unity versions. This only happens on iOS, Android and Windows Store work fine.

    When loading the bundle on iOS we get a message like:
    -[MTLVertexAttributeDescriptorArrayInternal setObject:atIndexedSubscript:], line 396: error 'vertex attribute index (18446744073709551615) must be < 31.'

    It wants to set the index to 2^64?

    The Asset bundle was built using Unity 2018.1.1f1 and the app with Unity 2018.1.0.f2.
    Could this really be this much of an issue even between minor releases?
    Android and Windows Store apps work fine (even when the bundle was built back in 2017.3)

    If the app and Asset Bundles were built with exactly the same Unity version it works on iOS also.

    This would be a huge drawback for us :(

    BR,
    Chris
     
    Last edited: May 28, 2018
    halilkayim likes this.
  2. halilkayim

    halilkayim

    Joined:
    Feb 27, 2018
    Posts:
    21
    We are facing the exact same problem, except our bundles are created with 2017.4 and the app with 2018.1.1f1. We still didn't have the chance to rebuild our assets to test if both Unity versions being 2018.1 solves the problem or not, but reading this post, I doubt it will.

    It is somewhat understandable that we may need to rebuild our asset bundles with different major versions, but minor versions are too much of a burden to keep track of. Unity Hub doesn't even let you install any lower minor version of the same release. As of now, I have 2018.1.1f1 installed on my machine, but Unity Hub shows the latest version as 2018.1.2f1. If another developer in my team decided to install the latest version on their machine, or let's say on our CI machine, this would cause major problems.
     
  3. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,378
    >>The Asset bundle was built using Unity 2018.1.1f1 and the app with Unity 2018.1.0.f2.
    that is expected to work. Did you report the bug with small repro?
    EDIT: ok upon rereading, are you *really* loading bundles built with 2018.1.1 in player built with 2018.1.0? this is not supposed to work [at least nobody ever test that] ;-). i was refering to opposite situation going 2018.1.0 -> 2018.1.1

    >> except our bundles are created with 2017.4 and the app with 2018.1.1f1
    so we did indeed broke backward compatibility of shaders in assetbundles but iirc it was in 2017.3
    so in that case it should work, so did you bug report with smallish repro?
     
    Last edited: May 31, 2018
  4. luminator

    luminator

    Joined:
    Jun 24, 2016
    Posts:
    1
    we are having the same issue: assets bundles made with 2017.3.0 make ios app to crash when loaded if the app is made with 2018.1.1

    Is this fixed in the latest update ( 2018.1.5 ) ?
     
  5. BernEugen

    BernEugen

    Joined:
    Mar 13, 2015
    Posts:
    3
    Facing with the same problem.
    Bundles were made with 2017.4.1f1, making build with 2018.1.5 and having the same issue.
     
  6. WolfBeardedLion

    WolfBeardedLion

    Joined:
    Apr 5, 2013
    Posts:
    27
    Facing the same problem.
    Bundles were made with 2017.3.1f1, making build with 2018.1.6f1 and having the same issue of iOS crashing.

    Android works well.
     
    Last edited: Jun 23, 2018
  7. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    260
    If you are getting a crash loading older bundles in newer unity versions, please open a fogbugz ticket about this. We will need the following info:
    1. Copy of the bundles you are trying to load
    2. What version was used to build the bundles (Ex: Unity 2017.1.2p4)
    3. What version was used to load the bundles and crash (Ex: Unity 2018.1.0b6)
    4. What asset you were trying to load from the bundle causing the crash. (Ex: "Assets/MyPrefab.prefab")
     
  8. WolfBeardedLion

    WolfBeardedLion

    Joined:
    Apr 5, 2013
    Posts:
    27
    Thank you for the reply back, but we were able to resolve the issue by rebuilding the Asset Bundles.
     
  9. zhaobaowang

    zhaobaowang

    Joined:
    May 23, 2017
    Posts:
    1
    Hi, the Assetbundle I bulid on unity5.6.3 can't be used on unity2018.1.6. Also Anima2d animation is not working properly. the shader is loaded but working wrong. It's a trouble to me.
     
  10. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    260
    You will need to rebuild your bundles. Object serialization between 5.6.3 and 2018.1.6 has definitely changed enough for certain objects that it won't work as expected (shaders are a big culprit of this as platforms have been adding lots of shader features)
     
  11. Unity1990

    Unity1990

    Joined:
    Jan 19, 2016
    Posts:
    9
    I'm facing with the same problem. AssetBundle built with 2017.4.3f1 and opened into 2018.1.6f1 produce this error:
    "could not be loaded because it contains run-time classes of incompatible version. Rebuild the AssetBundle to fix this error"
    Rebuilt doesn't work. The problem persist.
    If i try to download and open assetbundle into 2017.4.3f1, it work as aspected.
     
  12. PatrickRyanTT

    PatrickRyanTT

    Joined:
    Oct 11, 2018
    Posts:
    1
    Even after rebuilding the Asset Bundles in the matching Unity version that we are trying to load them in we still get this error:

    -[MTLVertexAttributeDescriptorArrayInternal setObject:atIndexedSubscript:]:396: failed assertion `vertex attribute index (18446744073709551615) must be < 31.'


    Then Apple clients, the OSX Editor, OSX Build and iOS Build, crash.

    Would there be anything else that is causing this issue or is there any thing else we can do? We are using 2018.2.10f1 for both the Asset Bundles and the Clients.

    The Build and Asset bundles do not crash on Windows Editor/Client, and Android.

    Any help much appreciated!
     
    Futurristic likes this.