Search Unity

Addressables and builded assets

Discussion in 'Addressables' started by mf_andreich, Aug 13, 2018.

  1. mf_andreich

    mf_andreich

    Joined:
    Jul 7, 2017
    Posts:
    38
    Hi all! I found one very disapointed thing... For example I have small ScriptableObject asset "AssetA". Its stored in some objects in scene and in some objects in Addressable system. What I want? I want load addressable object and compare "AssetA" from it with builded in application scene object "AssetA"... but its not equal. I think its because Addressable System not exclude objects that already built in application and duplicate my "AssetA" object... Right now I dont know how I can solve this... but its very strange behaviour.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Hi, thanks for trying out our system. There are a few issues you're running into. For one, anything directly referenced in a scene must be built and loaded with that scene. That's something completely separate from Addressables, or even asset bundles. Second, the issue of comparing assets after the build, this is a result of how data is built into asset bundles (again, a system predating addressables, that we have built on top of). As items are built into asset bundles (or the player build) they lose information about where they came from, making not possible to compare items that had the same source asset.

    These problems you're facing are some of what we set out to attack with this system. To help with managing what is in scenes, we came up with the AssetReference. It should look and feel like a direct reference in a scene, but won't actually cause the asset to be built with that scene.

    Alternatively, you could mark the scene as addressable rather than include it in your player build. If you do this, and mark your scriptable object as addressable, then the scene will end up in one bundle, the asset in another, and the asset will not be duplicated.

    Hope this helps,
    Bill
     
  3. mf_andreich

    mf_andreich

    Joined:
    Jul 7, 2017
    Posts:
    38
    Yes, move all used assets and scenes into addressables fix problem. Thx.