A while ago, I submitted bug report UUM-52890 where Unity does not render objects when shaders are stored in AssetGroups.
Unity 2022.3.2f1 and earlier versions do not have this issue. The regression was introduced in Unity 2022.3.3f1. In the meantime, the bug has unfortunately been ported to 2023 as well.
My bug-report was rejected with:
Perhaps I used Unity wrong the whole time and now something was fixed and the way I used it is no longer supported, because of reasons. That’s fine for me.
But could you please tell me how I can get it to work properly again? By building only the MainMenu and loading it directly, all the surrounding complexities have been removed and some problems don’t reproduce in isolation. Therefore, this advice does not provide me with a solution. I am also not sure which settings you are referring to.
Thank you for reaching out. I appreciate you forwarded my question. Unfortunately, I have not heard anything yet. I understand that it has only been two weeks and the developer may be busy. Would you be able to send a friendly reminder?
The bug report has been opened again, thank you for that. What remains is that somebody looks into the problem, pretty please
BTW, I have conducted further testing with my project and I am fairly certain that the issue is not related to some settings or scripts. I have tested on different machines, all at the same git state. They all encounter the same problem when building multiple times, as at some point, the windows standalone build stops rendering objects.
Upon examining the generated files, I have noticed that the generated assetbundle containing shaders has a different size depending on whether the build renders objects or not. This leads me to believe that the problem lies within the build pipeline.
In cases where the windows standalone build does render objects, the shader assetbundle is 25mb in size. In cases where the windows standalone build does not render objects, the shader assetbundle is only about 700kb in size.
When forcing assetbundles to rebuild, for example, by changing the “Internal Bundle Id Mode” in an Addressables assetgroup, sometimes the shaders are included in the build. However, it seems that the “Internal Bundle Id Mode” is not the root cause of the issue. This is because when I used the configuration that worked on my machine, and then pulled it on another machine for building, it did not necessarily work there.
The problem appears to be somewhat random, and I suspect that it is related to the build pipeline failing to include the shader variations in the assetbundle, as previously mentioned.