Recently my studio decided to switch from assetbundle to addressable asset.
All is fine until I load a scene that is addressable in packed mode or in build.
The scene load correctly but not all shader(Prety mutch everything is pink).
The shader not native to unity seen to be loaded correctly but not the one native to unity.
One common missing shader is Sprites/Default
The addressable asset are build for Window and my target is Window.
I’m on Unity 2018.4.2f1.
Can someone point out to me what could be wrong? ,Recently my studio decided to switch from assetbundle to addressable asset. All is fine until I load a scene that is addressable in packed mode or in build.
The scene load correctly but not all shader. The shader not native to unity seen to be loaded correctly but not the one native to unity. One common missing shader is Sprites/Default
The addressable asset are build for Window and my target is Window.
I also tested on Android and it doesn’t work.
Hi, thanks for the follow-up. My issue was that I was building for Android on a Windows PC, which caused the editor to not be able to correctly load the bundles. The build works fine on Android devices.
Thank you Patrick! This bug just got me too and my situation was the same as yours.
Another problem I am seeing with Addressables/Android is with the memory profiler when running a build on Android the textures are howing up but the memory sizes for individual textures is showing 0 for some cases. Sometimes it is all textures, sometimes just a few or none. Just seems to randomly change between different builds, and between different scenes.
I think you slightly misunderstood. The OP’s problem was their own code but Patrick_PS’s problem was that he was building the addressables content with Android as target platform. He was running the game in editor playmode with playmode script = Use Existing Build. When the game starts all the shaders that addressable content depends on is missing. However the same built game still works fine on the android device. This was exactly the same problem I was having (Unity v2019.3 and Addressables v1.8.3 [also tried v1.7.5 and same bug]).
No, I am using just the built in memory profiler. I attached a few screenshots to show you. These are all just regular textures. Some of the textures are just randomly showing 0 size. Simply re-starting the game gives different results with this problem. Mesh data for the corresponding objects all looks normal. If I run in editor or build for windows and run everything is also normal.
Ah ok, thanks for clarifying. I guess that’s a separate bug/ usability issue with Addressables that should be reported.
Weird. Could you maybe check if the Memory Profiler package also reports 0 B sizes for these? It splits the memory usage into Native/Managed and owned. Could be that the native memory here is owned by something else (Addressables) and these are just around via their Managed Shell objects? Or maybe you have references to them but haven’t loaded them into memory via Addressables? Anyways, it’d be nice if you could report that as a bug so we can explore what’s going on there. Could be by design with how Addressables works but then we should probably mention that somewhere in documtation at least.
I just tried but it took over an hour and had not completed and I need to go now. I will try this another time.
No, these textures are all on base scene objects. Just one simple call to load the scene. Then unload that scene and load another scene etc. I am not instantiating anything but the scene itself. It’s giving different amounts of these 0 size results for the same scene objects textures when I change between scenes, rebuild the game etc. All the mesh data sizes for the objects these textures are on are normal.
Thanks Martin. I will try to report these bugs soon.
Whoops, sorry forgot that you might be on a version >=2019.3.12f1 with this bug still present… If you are, you’ll have to wait for the fix to land or downgrade to 2019.3.11f1 to capture but downgrading is obviously tricky so…
Also, that capture bug was caused by a fix to properly get all memory connections, e.g. between sprites to their atlases, so maybe it’s best to wait a bit for the fix. It’s in the pipes and hopefully will land and be released soon.
Ahh that would be the problem then I assume. I heard the memory snapshot can take a long time on mobile so I wasn’t sure about it. I will wait for the fix and follow up on this. Cheers.
Hello! Did you find a solution for this? I had my project working properly and then I just changes the locations of some of the assets inside the project, rebuilt the addressables and now the materials in editor are pink (using existing build) and on device (oculus quest 2) does not appear, but if reassign the shader in editor is just work… weird because the same shader was already assigned