Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

can't load Sprite from spritealtas not "directly" include in a group

Discussion in 'Addressables' started by wolilio, Oct 26, 2020.

  1. wolilio

    wolilio

    Joined:
    Aug 19, 2019
    Posts:
    28
    my load code
    Code (CSharp):
    1. public AssetReference spriteRef1;
    2. void Start()
    3. {
    4.     spriteRef1.LoadAssetAsync<Sprite>().Completed += (async)=>
    5.         {
    6.             img1.sprite = async.Result;
    7.         };
    8. }
    when the spriteatlas is dragged to group directly , it works fine ,img1 display right .
    11.png

    however ,when i drag spriteatlas 's folder to group ,
    22.png

    i get error like this:
    Code (CSharp):
    1. Exception encountered in operation Resource<Sprite>(common.spriteatlas[bg]), status=Failed, result= : Unable to load asset of type UnityEngine.Sprite from location Assets/Res/images_pak/common.spriteatlas[bg].
    2. UnityEngine.ResourceManagement.Util.DelayedActionManager:LateUpdate() (at Library/PackageCache/com.unity.addressables@1.16.7/Runtime/ResourceManager/Util/DelayedActionManager.cs:159)
    please help

    unity :2019.4.10f1
    addressables: 1.16.7
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    I'll forward this to the team for some guidance!
     
  3. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    This error start appearing again since v1.16.1, including 1.16.6 and 1.16.7
     
  5. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    The team agrees that there looks like some regression going on. Can you file a bug report for us so that the team can have a closer look at what you're experiencing?

    https://unity3d.com/unity/qa/bug-reporting
     
  6. wolilio

    wolilio

    Joined:
    Aug 19, 2019
    Posts:
    28
    ok ,i just filed