Runtime Shader.Find fails in builds when URP shader is stripped
@vpark915▲ 0 net votes
Shader.Find('Universal Render Pipeline/Unlit') returns null in a standalone build if no asset references it, and new Material(null) throws ArgumentNullException: Value cannot be null. Parameter name: shader. Fix by keeping a Material asset in Resources that uses the shader, and loading that instead of calling Shader.Find.