Search Unity

Resolved Addressable Scene not updating

Discussion in 'Addressables' started by RunninglVlan, Nov 8, 2019.

  1. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Hi,

    I have an Addressable Scene which is being loaded, it has functionality to instantiate Addressable GameObject. Both are in the same newly created group (Create New Group > Packed Assets). Here everything works correctly. And I'm using Packed Play mode script.
    When I change Scene (e.g., add a Text to Canvas) and change a Prefab which will be Instantiated (e.g. add a Sphere to it), then prepare new packages (Build > New Build > Default Build Script), and enter Play mode, I only see GameObject changes, no Scene changes.
    The only way I can see Scene changes too is by cleaning Build Cache (Build > Clean Build > All) before creating new build.
    Is this a bug or I'm missing something?
    Yeah, and I'm using Addressables v1.3.8 (and Unity v2019.3.0b8).

    Update: Tested in v2019.3.0b9 too, works the same.
     
    Last edited: Nov 8, 2019
  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Sounds like a bug. Would you mind filing one with Unity. There may be something with the build pipelines incremental build or something in regards to scenes. Hard to say for sure but that definitely sounds like a bug.
     
    RunninglVlan likes this.
  3. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Last edited: Aug 7, 2020
  4. melissae

    melissae

    Unity Technologies

    Joined:
    Dec 5, 2018
    Posts:
    9
    We have this in our backlog for prioritization.
     
    zhuchun and RunninglVlan like this.
  5. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    It was me. Last time I tried addressable got the same result and thought that was my fault
     
  6. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    I think a fix for this went in recently. I don't believe it's been released in a public version yet but it sounds like an issue we've recently resolved internally.
     
    zhuchun likes this.
  7. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    [Unity 2018.4.18; Addressables 1.7.5]

    I think I have this issue. I have an addressable scene that contains a direct reference to a prefab. I recently moved the prefab to another folder and it still works in the editor (fast mode). But in builds (or when using "existing build") the inspector says that the prefab is missing.

    Is there a quick fix for this?

    edit: My jenkins build script calls
    Code (CSharp):
    1.             AddressableAssetSettings.CleanPlayerContent();
    2.             AddressableAssetSettings.BuildPlayerContent();
    I thought this completely rebuilds all the bundles and such an issue would be avoided.
     
    Last edited: Apr 3, 2020
  8. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    Ok, sorry for the confusion. It turns out its an issue with 'dont destroy on load' as described here.
     
  9. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Ah, no worries. Glad you found that thread.
     
  10. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    That thread did not help me fix the issue. In 1.7.5 when I set a game object to 'dont destroy on load' and then close the scene it came from all direct references to sprites and prefabs become missing. This did not happen in 1.6.2 and previous versions.
     
  11. DennisWardAltair

    DennisWardAltair

    Joined:
    Apr 4, 2019
    Posts:
    27
    I have a similar issue with dynamic scene addressables: I have created 4 addressable scenes, each in there own group, and am loading them via addressables from a blob store on Azure. The scenes have "Update Restriction" set to "Can Change Post Release". I was under the impression that if there was more recent content on the server, it would get downloaded, but use the cached version otherwise.

    If I set the play mode script to "Use existing build" - the new scenes are downloaded as I expect from Azure.

    A built version, however, always uses the original version of the scenes. All load paths are set to remote

    I was using Addressables v1.8.4 but also had no luck with 1.13.1 along with v2020.1

    Any help or advice is appreciated.

    Thanks, Dennis
     
    Last edited: Aug 6, 2020
  12. DennisWardAltair

    DennisWardAltair

    Joined:
    Apr 4, 2019
    Posts:
    27
    I modified my setup a bit and changed the setup so the initial scene was built-in and not an addressable, and the only scene in the build list. The next three scenes I made addressable thinking that there might be some sort of conflict if the addressable content I wanted was also part of the scenes being built. I did this based on this forum post I found: https://forum.unity.com/threads/make-scene-as-addressables.944505/

    The addressable scenes load, but nothing gets updated when I update the addressable content on Azure (they only appear as they were when first built).

    How are dynamic addressable scenes supposed to be updated from more recent content on a server?

    Thanks, Dennis
     
  13. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    Are you using a CDN? You might have to invalidate the cache for the catalog json and hash files when you update them. (This is why I never do content updates, I just build new every time and load the catalog separately.)
     
  14. DennisWardAltair

    DennisWardAltair

    Joined:
    Apr 4, 2019
    Posts:
    27
    Yes I'm using a CDN (Azure blob storage) and every time I make a change, I replace all content on Azure with a build from scratch. This is a simple test example, so I'm just trying this stuff out.

    Thanks, Dennis
     
  15. Zampilo

    Zampilo

    Joined:
    May 6, 2018
    Posts:
    12
    any update? i have the same problem, i update a remote scene with the same tutorial in unity. The assets update very well, but new scripts shader or etc no. Any solution?
     
  16. DennisWardAltair

    DennisWardAltair

    Joined:
    Apr 4, 2019
    Posts:
    27
    I think I may have misunderstood of this feature. I was assuming that I could download pretty much anything, including code/scripts attached to game objects, which isn't possible as far as I know.
     
  17. abhi_nb

    abhi_nb

    Joined:
    Jul 16, 2019
    Posts:
    5
    Still not working on Addressables 1.8.5
    Im using Addressable Package Version 1.8.5 (Verified Version) and Im not able to download/update to the latest addressable builds which are on a CDN.

    In the addressable scene, I have tried adding few new elements to the existing canvas, removing elements from an existing canvas, updating a prefab by replacing a cube mesh with a sphere mesh, adding a new entry to the list<Color> which is attached to a different prefab. Updating a previous addressable build, built a new addressable build.

    None of these have worked.

    I dont understand how such an important feature of a game engine is so broken.

    Using Unity 2020.1.13f1
    Is this a bug in Unity or am I doing something wrong?
     
  18. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    You're using a pretty old version of Addressables. You might try upgrading, and seeing if that resolves this.
     
  19. abhi_nb

    abhi_nb

    Joined:
    Jul 16, 2019
    Posts:
    5
    The latest version of Addressables available on Package Manager is 1.16.15 and it is not verified.

    And is there any functionality provided addressable assetbundle provider to cancel an ongoing download?

    Have used AbortRequest() to cancel the download but then when I try to download it again, I get "Attempting to use an invalid operation handle" error.
     
  20. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    @abhi_nb 1.16.15 should be verified now for Unity versions 2019.4 and up. As a note, we don't have any way to backport fixes so anytime a fix is added in it'll require a package version update. There is not currently a way to cancel a request for a downloaded AssetBundle.