Search Unity

Can you have addressables within a package?

Discussion in 'Addressables' started by KeefJudge5AI, May 23, 2019.

  1. KeefJudge5AI


    Nov 26, 2018
    We've been experimenting with making our own packages for various shared parts of our projects, and also playing with addressables.

    One thing we thought of doing was to have assets in packages (e.g. a Vehicles assets package), with pre-made bundles within it (e.g vans, buses, taxis, etc), which our various projects can inherit, but it doesn't seem to work because the addressables system only takes into account one AddressableAssetsData folder and ignores any incoming ones in packages.

    If I mark a scene asset as addressable in a package, assign it to a group, then import that package into another project and try to open the asset, it fails with the following error.

    Cannot open scene at path Library/PackageCache/ai.five.addressablestest@0.0.2-preview/Runtime/AddressablesPackageScene.unity. Maybe the scene hasn't been imported. This can be done with an AssetDatabase.Refresh() call.
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

    Is this a workflow that's planned to be supported? Are there alternatives that might work? Ideally, we don't want to have to define the addressable groups in every project that uses a particular package, we'd like the tools we build to JustWork™ pulling the bundles from AWS (or wherever we eventually put them).

    Thanks for any help.