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

AssetReferenceSprite SubEditorObject broken

Discussion in 'Addressables' started by Nilokilo, Nov 23, 2021.

  1. Nilokilo

    Nilokilo

    Joined:
    Oct 21, 2020
    Posts:
    9
    Hi,

    just wanted to mention a bug in the Addressables version 1.19.11 where setting the subObject is no longer possible.
    Example with filled guid and sprite:

    AssetReferenceSprite addressReference = new AssetReferenceSprite(guid);
    addressReference.SetEditorSubObject(sprite);
    Debug.Log(addressReference.SubObjectName);


    The SubObjectName is always null in version 1.19.11 but it works correctly in version 1.19.6.
     
  2. Nedyalkov

    Nedyalkov

    Joined:
    May 20, 2017
    Posts:
    8
    Hello,

    I have the same issue. I can no longer set to a AssetReferenceSprite the SpriteAtlas and then Sprite as subObject from code. I tried everything I can think of but I always receive this warning:
    Assigned editorAsset does not match type UnityEngine.Sprite. EditorAsset will be null.

    If this is not a bug can you at least provide how to do it correctly. The latest version where this works is 1.19.9 and on the newer versions it doesn't work anymore.
     
  3. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    Any updates or Infos on this @TreyK-47? It's still broken with the latest version.