Reputation: 109
In unity I'm trying to give the standard universal render pipeline shader to a mesh i made but I only know how to do it if it's the non universal render pipeline and changing the the standard to the path of the universal render pipeline Lit shader dons't work. I have been looking for a few hours for a fix and i only found Shader.globalRenderPipeline
but that's not supported in unity 2019.3
meshObj.AddComponent<MeshRenderer>().sharedMaterial = new Material(Shader.Find("Standard"));
Upvotes: 3
Views: 2783
Reputation: 109
i fixed it!!!! i found it in the unity documentation link under upgrading your shader even tho that's stupid since i created the project as universal render pipeline so in my mind it should have been standard
meshObj.AddComponent<MeshRenderer>().sharedMaterial = new Material(Shader.Find("Universal Render Pipeline/Lit"));
Upvotes: 7