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

Asset bundle and Invalid serialized file version problem after upgrading unity

Discussion in 'iOS and tvOS' started by antikhaoz, Jul 12, 2011.

  1. antikhaoz

    antikhaoz

    Joined:
    May 7, 2010
    Posts:
    51
    Hi !

    First of all sorry for my bad english.

    I had a long time working with Unity 3.10f4 and just upgraded to Unity 3.30f4.

    First I had to start a new in a new xcode project because it wouldn't let me build and append in the previous xcode project, no problem with that.

    I began testing my app and received this error when i tried to load an asset bundle:

    Invalid serialized file version. File: "none". Expected version: 3.3.0f4. Actual version: 3.1.0f4.

    I'm forced to rebuild all my assets bundles in my upgraded version of unity ?, no workaround for this ?. I just have an enormous number of asset bundles distributed across a ton of scenes..

    Another question, kinda of related, now that i made the jump from 3.1.0f4 to 3.3.0f4 ...any significant differences in the way my asset bundles work ?, or any other known problem i should be are aware of after upgrading ?

    I should expect to go trough this process every update ?, for example, if i upgrade to 3.4 in the future im gonna have to remake all my asset bundles and start a new another xcode project without being able to append in my old one ?

    Thanks !
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Yes you need to upgrade them.
    Whenever something more indepth is done that requires a change in the asset bundle formats, you will need to upgrade them.

    The xcode project replace is required on every update basically, yes. Cause the appcontroller and other things change and append can't impact them, it requires replace.
    Asset bundles only if things related to asset bundles are changed (unsure if the changes mentioned for U3.4 with the cache api available on mobile will require a rebuild sorry)
     
  3. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    Have same problem, just updated to v3.4.2f3 from v3.4.1f5

    Is there no way of assetbundles being backward compatible, having to rebuild my assetbundles is a huge pain, I have lots and lots of them. :-(
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The solution is not to upgrade to 3.4.2 but remain on 3.4.1 I fear
     
  5. JFo

    JFo

    Joined:
    Dec 9, 2007
    Posts:
    217
    Unity should at least support loading same major version (ie. like 3.x) bundles. It is very bad decision to force all assets to be updated after minor bug fix releases. In addition there are no reasons why the AssetBundles should even be both platform and version dependent, except lazy implementation.

    Good Asset loading/saving is one of the basic functionalities of serious game engine and Unity is failing quite badly as AssetBundles doesn't even support their own lightmapping without ugly hacking.

    BR,
    Juha
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    A serious game developer does not update the engine mid project, thats a thing indies, noobs and people blocked by major bugs do, nobody else.

    I would normally agree on this but fact is the constant changes to prefabs for example and bug fixing make it impossible (the prefab system has changed in some form on basically every single 3.x release and prefabs are a major part of what you use asset bundles for)

    I don't comment on the lightmapping part as my stance towards Unity complete lack of any 2008+ style level streaming even in Unity 3.x is widely enough known by now I guess, at latest since I joined the 'fork and torch' mob when I realized that Occlusion Culling can not be streamed in any form (beast can be force to work at least) ;)
     
  7. JFo

    JFo

    Joined:
    Dec 9, 2007
    Posts:
    217
    The main problem is not in the development phase, but the time after the release. Serious game developer do provide support for their product by updating and fixing bugs also after launch. If every bug fix round requires a new set of compatible AssetBundle set (lets say we have about 100 assets) it is a really horrible scenario, when you should somehow handle all the different versions of the product out there and build the whole AssetBundle library again every time a new bug fix from Unity arrives...
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Or you simply don't upgrade the engine if there is no need for it.
    Unity has a given tendency to require porting on every .x update and breaking things with regression.

    As such you are going to invest a lot of time there normally, compared to which clicking a single menu entry to rebuild all the bundles is trivial, which is a one time work, namely writing the editor script doing it and a halfway structured planning on how to organize the project so it can do it automated (or even along your 'build' script)
     
  9. JFo

    JFo

    Joined:
    Dec 9, 2007
    Posts:
    217
    That's not very constructive advice.

    And you seem to underestimate the problem. The compatibility matrix is two dimensional: both platform and version.
    It is version control nightmare, when you support desktop, iOS and Android platforms. As there are different versions in every platform, there have to be multiple copies of the whole AssetBundle lib.

    This thread has shown that incompatibility in AssetBundles is a problem to many Unity developers. I'm sure you agree that all the solutions you are suggesting are unnecessary extra work, that we could use more on the game than overcome the lack off proper external asset handling.

    The ULIB in the Asset Store shows it is possible to serialize assets to binary even using the exposed Unity c# api. I don't understand why Unity cannot do the same in more optimized way as they have a direct access to the internals.