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

[0.8.4] Case 1153590 - Everything turns pink if texture in prefab is LoadAssetAsynced

Discussion in 'Addressables' started by chanon81, May 10, 2019.

  1. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    Hello,

    I have this problem where I am using LoadAsset to load a prefab for a level.
    Then when I am done (eg. the level ends), I Release it.

    (I Instantiate a GameObject from the loaded prefab and then Destroy it before releasing the prefab)

    It works fine the first time.

    However, the next time I load the same level, the prefab loads fine, no errors, but all textures are pink??

    I am currently trying to create a minimal reproduction, but does anyone have an idea what I may be doing wrong or if this is a bug in AddressableAssets?

    I used this same code in 0.5.3 and it was working fine, but now in 0.7.5 I can't get it to work.
     
    Last edited: May 10, 2019
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    I've not heard of this, so a repro project would definitely help. sounds like the shader bundle isn't getting reloaded. No idea how that could be happening.

    If you are having trouble making the project, and want to poke at the problem a little yourself, you could try using the profiler. That'll show what we think we have a ref count too, and maybe it'll be clear when something is/isn't getting unloaded.

    Thanks for letting us know, and i'm looking forward to the repro!
     
  3. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    My Bug Report with minimal reproduction for this is being uploaded.

    What is happening is that:
    - if a prefab uses a texture
    - and then that texture is independently LoadAssetAsynced somewhere else and it hasn't been released yet
    - when releasing the prefab and then loading it again, ALL textures inside it become pink

    Will add case number here when it finishes uploading.

    After experience from the last bug, this one took only about 4 hours to nail down.

    We're preparing to do an internal play test of our game... which is why we're trying to get the actual (non Fast Play Mode) builds to work and so we're running into these issues now.
     
    Last edited: May 11, 2019
  4. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    Case is 1153590
     
    unity_bill likes this.
  5. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks!