I was wondering if I can create an Adressable Asset from a project A and then reference that Adressable Asset as an “local” Adressable Asset inside a project B ?
The idea is to have a main project that can load/stream mini-games. In order to ease the development each mini game would be developed in its own Unity project. I’d like all min-games to be already in the main project so local Addressable Assets sound good. But is it possible to create an Addressable Asset from a mini-game project and then move it to the main project and having it considered as local Addressable Asset ?
This is a workflow we intend to support. We have some things in place to handle it now, but they are not yet documented or fully fleshed out. I will try to put together some more detailed notes on this next week to post here.
That’s great news. We really see Adressable Asset as a solution to separate really different part of big project. I will wait for further information about this.
Hi, Addressables has an API to load additional catalogs from a settings.json file:
public static IAsyncOperation LoadCatalogsFromRuntimeData(string runtimeDataPath).
This is the file generated into the streaming assets folder that contains the runtime settings for the Addressables system. You would need to copy this file (renamed) from your secondary project into your project that builds the player and load it manually after the original one loads.
Something like this should work:
Addressables.InitializationOperation.Completed += op => Addressables.LoadCatalogsFromRuntimeData(“othersettings.json”);
We are also thinking of ways to make this process a bit more straightforward so we welcome your feedback.
Thanks for the detailed explanations. So if I get it the right way, in that case an “other project” Adressable Asset could not be directly referenced in another project. I mean, using a drag & drop inspector field but instead use a string to reference the asset name/adress. Is that right ? If so, I think its totally acceptable but more straightforward process will be welcome
@PaulBurslem I’m not quite sure to understand what you explained.
I do not want to download an AddressableAsset from an other project, I think I really badly explained my need. I want to be able to create an AddressableAsset from a project A and then make this AddressableAsset available in a project B. It would be more like be able to move the asset and added to an other project and then add it to a group.
Otherwise I do not understand how an AddressableAsset created from a project A can be available in a project B, except if it’s a remote AddressableAsset but if I want it to be a local asset it should be present in the project, right ?
In the project in which I want to load this catalog, what files/folder should I copy and where ? I tried to copy-paste the StreaminAssets folder and put it in the Assets folder on my project and renamed the settings.json into settings2.json.
Sorry to bump that post but still trying to figure out how to achieve that. It would be really useful to reference other project addressable assets. It would allow to have specific Unity project to specific modules and a main project able to load ( reference ) those modules.
@unity_bill any any news regarding that workflow ?
This could be solved nicely if you could extend the system to allow dragging things from Packages tree in Project pane to Addresables panel and make the generated path dependent on package name. UPM is already a good cross-project code sharing tool.
Has anyone managed to get this to work? I think I’ve exhausted all possible path combinations (relative and absolute) but Addressables.LoadCatalogsFromRuntimeData always returns AsyncOperationStatus.Failed.
We need to be able to build these catalogs and bundles independently from building the entire project. Then we want to selectively load a .json file and add the items contained to the current Addressable Catalog at runtime. Is this currently possible?
I’m not sure if you saw my thread, but I’ve managed to build asset bundles in one project and load them in another, but it’s very clunky. This was done with the 0.3.5-preview version however, so I’ll be moving to the 0.4.6-preview version this week to try and improve the flow with that.\
@unity_bill We also would require this functionality. Otherwise we have to include all potentially loaded scenes into our main project would become huge. We are talking about 400 scenes à 100MB-500MB incl. lightmaps, etc (planned - not realized yet because currently this seems not to be easily possible).
It would be really nice to be able to load those by loading all settings.json of each of the 400 projects and keep each of those scene in a different unity project.
Looking over this whole thread, sounds like some parts may be broken, and some may just need clarity. The part I know needs clarification… the idea is that you’d have some main base project “ProjectHome”, and some other projects with assets, “ProjectOther”. You would use addressables to have access to some assets in ProjectOther via a string address (no direct ref), and would use addressables to build those assets into asset bundles. From there, you should be able to either put all those bundles online to load them from ProjectHome, or put them into StreamingAssets in ProjectHome to load them.
But, it sounds like people are running into bugs, and this is a workflow we have not fully vetted. So in the coming months, we’ll plan to work out a sample that demonstrates (and tests) this.
Oh yeah! That would be soooo awsome. Also because we are running into the simple problems of huge unity projects, huge repositories (even when git lfs), and that would help so much to solve all that.