Can not reference to script when loading remote catalog

So I try to load a remote catalog by LoadContentCatalogAsync() and the flow I am using is:

  • InitializeAsync()
  • LoadContentCatalogAsync()
  • LoadResourceLocationsAsync()
  • DownloadDependenciesAsync()
  • LoadAssetsAsync()
  • LoadSceneAsync()

I try to load a scene from another project and It has successfully loaded. But the script attached to gameObjects in that scene is missing. The warning is “The referenced script on this Behaviour is missing!”. I tried the fix here (https://forum.unity.com/threads/getting-the-referenced-script-unknown-on-this-behaviour-is-missing-when-loading-adressable.1157132/ ) but it is not working. Anyone have any ideas?

P.S the result files built from another project
8252448--1080273--upload_2022-7-5_9-51-7.png

Correct me if i am wrong, I saw it from __ another post __ that the project A that loads a catalog from another project B has to know about all the scripts. So I guess I have to import every scripts from B to A.
P.S I am using IL2CPP as scripting back-end

Hello, yeah that’s the case, unfortunately. The base project’s player will need to be aware of all the scripts you’re trying to use. In general, for multi-project workflows, try and keep the ancillary to as much “content only” stuff as you can. But, in cases where that’s not possible, you’ll have to make sure the base project knows how to get those scripts.

You might could ship dlls compiled with project B into project A, load them, and then load your Addressables. I haven’t actually done that before, so take that with a grain of salt, but I think that could work. But, it may just be easier to have copies of your scripts, depending on your project.

2 Likes