Search Unity

Sub-assets and addressable assets

Discussion in 'Addressables' started by vidra, May 7, 2019.

  1. vidra

    vidra

    Joined:
    Jun 8, 2014
    Posts:
    7
    Hi everyone.

    I'm currently using a custom graph based editor to edit a custom format that is handled by custom ScriptedImporter. Custom ScriptedImporter then imports the asset by creating a main object that is a scriptable object and several sub objects that are added using AddObjectToAsset to a single asset.

    Will addressable assets be able to handle that asset in such a way that each scriptable object can be referenced by AssetReference?
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Probably. the word "custom" is in there a lot, so I'm not sure what exactly you'll run into. It should work. If not, it's probably a bug. So feel free to try it, and let us know of any issues.
     
  3. vidra

    vidra

    Joined:
    Jun 8, 2014
    Posts:
    7
    When I wrote custom I meant the a ScriptedImporter that handles and imports my file format into asset. Then again, you can say that for every ScriptedImporter. Sorry for the confusion. I'll keep you posted.
     
  4. vidra

    vidra

    Joined:
    Jun 8, 2014
    Posts:
    7
    I created some public AssetReferences and tried assigning subassets to the the AssetReference. It resolves to the main asset. When trying to load AssetReference async, the main asset is resolved instead of the subasset. I guess the solution is not using subassets in the first place.
     
    ryan-at-melcher likes this.