Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

are addressable assets loaded twice if I reference them?

Discussion in 'Addressables' started by craig4android, Jun 18, 2019.

  1. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    113
    let's say I reference an addressable in my scene by it's direct reference not by it's addressable representation,
    then I load the same asset again as addressable will the system recognize that it's the duplicate of the same asset, which was referenced in scene directly?
     
  2. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    1,013
    that depends.

    If the scene is addressable, then during build, as the scene is being built, it recognizes that it depends on something in a bundle (something addressable), and will point to that thing. when loading, they are recognized as being the same thing.

    If the scene is in the editor scenes build list, or in Resources, this won't happen. Those builds happen separately, and they have no idea that you are also including this dependency elsewhere. So the asset gets pulled in (duplicated). As of 1.1.3 we have tests to check for this sort of duplication in the Analyze window.
     
unityunity