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

AssetBundle variant switch

Discussion in 'Scripting' started by marcojacovone, Mar 1, 2017.

  1. marcojacovone

    marcojacovone

    Joined:
    Jul 7, 2014
    Posts:
    63
    Hi,

    for our game, we use AssetBundles. The process is

    A simple loading scene compute which particular asset bundle variant have to be loaded, for audio, graphics, meshes, etc. At the end, we load a last asset bundle containing the main scene and load that scene via SceneManager.LoadScene(...).

    The process work very well, and asset variants are correctly loaded and attached to the scene objects.

    My question:

    In some case, we have to switch a particular variant of a loaded bundle, without reload the scene that use it. So we unload the bundle variant, and load the new one, but the scene doesn't changes. If we unload the old bundle with "Unload assets" to "true", the assets report "missing" in texture fields, and once we loaded the new bundle variant, these textures does not connect with it, and remain "missing".

    There is a way to switch a variant without reload the scene?

    Thanks in advance.
    Marco
     
    egamestudio likes this.
  2. egamestudio

    egamestudio

    Joined:
    Mar 11, 2016
    Posts:
    5
    I'm interested in the same thing.