Search Unity

"Addressables are not available in edit mode" and unit testing

Discussion in 'Addressables' started by 5argon, Sep 22, 2018.

  1. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    This is a major barrier to do unit testing. With `AssetReference`'s `.editorAsset` we could make a branch to give immediate asset in-editor (in turn when unit testing) and async load in the real game. But what if we don't have `AssetReference` but just the string address? The common scenario of this is when using the folder drag-drop to the Addressable window to force an automatic naming via its file name + parent folder, then address them by name. Then I would have a maintained list of string names.

    I think there should be a way to turn string address into an editorAsset at least. Or string address -> GUID -> AssetReference -> editorAsset

    Currently with AssetReference I do it like this :

    Screenshot 2018-09-22 15.58.02.png
     
    Last edited: Sep 22, 2018
    Xarbrough and deizel like this.