Hi,
We have a scene that is marked as addressable and loaded asynchronously through script in a manner similar to this tutorial: Learn game development w/ Unity | Courses & tutorials in game design, VR, AR, & Real-time 3D | Unity Learn
Inside the addressable scene is a mesh renderer. That mesh renderer references a material. The material has two variants, MatPC.mat and MatMobile.mat. Both of these materials are addressable and are accessed by the same addressable address (Mat.mat). We have 3 addressables groups - Default, PC and Mobile. The scene is in the Default group, MatPC.mat is in the PC group and MatMobile.mat is in the Mobile group.
In the editor, the default reference in the mesh renderer inspector points to MatPC.mat. We were hoping that since the material is marked as addressable, it would be loaded by default using its address. This would allow us to exclude the PC group in a mobile platform build and have that reference automatically use MatMobile.mat instead. However, in testing in the editor, if we exclude the PC group from the content build, it still uses MatPC.mat. So it seems that the system doesn’t load dependencies using the addressable address this way.
Is there a way to get this behaviour out of the Addressables system? Do we have to swap out the references ourselves in a scene post process to achieve this?