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

Possible to build Asset Bundles for multiple platforms without reimporting ALL assets?

Discussion in 'Asset Bundles' started by J_P_, Oct 3, 2018.

  1. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Creating asset bundle via C#

    Build Target in editor is iOS, build iOS AssetBundle - quick
    then build Android AssetBundle - has to reimport everything first
    then it reimports everything AGAIN because editor is still targeting iOS

    Why can't it just reimport the assets in the asset bundles instead of ALL the assets in the project?

    And if for some reason it really does need to reimport ALL assets, does it not cache any of that? Unless I'm crazy, I'm pretty sure an older build pipeline I made could build entire apps for Win/Mac/Lin without reimporting everything each time.

    Is there something I'm missing? Because this is a huge pain.
     
  2. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    J_P_ likes this.
  3. naked_chicken

    naked_chicken

    Joined:
    Sep 10, 2012
    Posts:
    186
    I’d actually still love to know the answer to this.
    Cache server definitely helps, but if your project is very large, this is still extremely time consuming.
     
  4. Ryanc_unity

    Ryanc_unity

    Unity Technologies

    Joined:
    Jul 22, 2015
    Posts:
    332
    This is an issue with how the Asset Database works today in that it can only track the current single set of imported artifacts for a source asset. This is changing with Asset Database v2 that is coming later this year. I'm not 100% sure if initial ADBv2 release will have everything turned on to improve this situation, but it is coming as we have already used ABDv2 in on demand import mode for another feature being developed.
     
    J_P_, EirikWahl and M_R like this.
  5. naked_chicken

    naked_chicken

    Joined:
    Sep 10, 2012
    Posts:
    186
    Would it work to build the asset bundles in an empty (except for the assets you want) project and then move those asset bundles to your main project?
    Right now it is taking about 10-15 minutes per platform (except the main one). That’s with cache server enabled.
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,591
    I have the project in a version control system. I pull the project to separate directories, a separate directory for every platform.

    If the project targets Android, IOS and Win64, I end up with three copies of the project in separate folders for those platforms.

    In order to build, I open the corresponding project for that particular platform and build. No platform switching necessary.
     
    Sohaib_techverx likes this.