#Hi I am loading asset bundles of scenes
1 messages · Page 1 of 1 (latest)
Did you build the localization addressables?https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/QuickStartGuideWithVariants.html#preview-and-configure-your-build
But how do I build the localization addressable in editor, if the asset bundle is loaded in runtime? (Maybe I am understanding the concept wrong)
If its not working in the Editor then its something else. Do you get any error messages?
In the second project it works, the thing is that it doesn't work in the main project. The system is this: One Unity project “A” which is the main project, where I load asset bundles. Another Unity project “B” which consists on a scene with some localized strings. In B, the localized strings work fine, I see the text and it changes between languages. Then, I create an asset bundle of that scene, and I save it in project A. When the project A is running and I load the asset bundle (the scene of project B), the scene loads fine, but the texts that have the localized string say: “No translation found for “key id 18897441….””.
You are losing the Addressables configuration when you switch projects. Try this workflow https://docs.unity3d.com/Packages/com.unity.addressables@1.21/manual/MultiProject.html
Ok thank you, im gonna try that! Just one noob last question, is it the same asset bundles and addressables? Because I am just creating asset bundles in a project with this: BuildPipeline.BuildAssetBundles(assetBundleDirectoryPath, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget); and then loading the file in another project, I dont know nothing about addressables.
Addressables does also use Asset Bundles to store its assets however it also needs to know what bundles exist and where they can be found, this is provided by the catalogue. You dont need to handle the bundles when using Addressables, it will build and load them for you. You can still use asset bundles alongside to do your own thing though.
It does sound like you could just switch to using Addressables for your scene as well, probably simpler to use them for everything than have 2 different systems
The problem you have at the moment is your moving an asset bundle across to another project but the other project doesnt know where to find the asset bundles it needs for localization.
That data is not part of your scene bundle
so if load these 4 asset bundles in my main project with the same method I load my asset bundles of scenes, could it work?
No. The system asks Addressables for the resources, it locates the bundle, loads it and then passes back the requested instance. Just loading the bundle wont help unless you also do the other steps. If you copy the catalogue file and link it up as described in the link then it will work.