Search Unity

Loading Scriptable Objects by label?

Discussion in 'Addressables' started by LordCalvert1977, Jan 22, 2020.

  1. LordCalvert1977

    LordCalvert1977

    Joined:
    Nov 22, 2013
    Posts:
    13
    Hi! I've tried this for a couple of days now and can't figure it out.
    Basically what I'm trying to do is populate a list with scriptable objects. When they populate the list they will show up in the ui as a bunch of buttons with icons. Then I can just upload more scriptable objects to a server and the player get more levels.
    That's easy enough when I'm not trying to use addressables.
    I can also manage to do it with:
    Code (CSharp):
    1. [SerializeField] List<AssetReference> _referencesSO = new List<AssetReference>();
    and manually put them in from the inspector.
    But I wanna do that by labels as I can with ordinary gameobjects.
    Is there something I'm missing or is it not possible?

    Thanks in advance!

    /David
     
  2. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    Try
     AssetLabelReference