Search Unity

[0.8.4] Case 1153671 - Prefab with no sprite kept loaded causes other prefab to be pink

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

  1. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    This one actually might be the same thing as Case 1153590 (https://forum.unity.com/threads/0-8...texture-in-prefab-is-loadassetasynced.675724/)

    It may just be another way to reproduce the same thing, but this one is so easy to reproduce it surprised me.

    Using Addressables.InstantiateAsync / Addressables.ReleaseInstance
    - MyPrefab2 which is just an empty gameobject is instantiated
    - MyPrefab1 which contains a spriterenderer is instantiated, all is still fine
    - The instance of MyPrefab1 is released
    - MyPrefab1 is instantiated again. This time it will be pink.
    - MyPrefab2 instance is released
    - MyPrefab1 instance is released and instantiated again. This time it will be normal.

    After working around for previous bugs, I still have some pink objects in my game upon 2nd load of the game level. After reproducing this one and seeing how basic it is though, I can't continue as this one is so basic. My game might be surfacing other bugs though, so will need to wait until this is fixed.

    While finding these bugs, I also found bugs in my own code too, so at least it was productive.
     
  2. chanon81

    chanon81

    Joined:
    Oct 6, 2015
    Posts:
    168
    BTW the same thing happens for this case and 1153590 if Addressables.LoadAsset/Release are used to load prefabs and then instantiate from the prefabs (which is how my game actually does it).
     
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for the repro. we'll look into it.