#How to reference URP Lit Shader through code?

1 messages · Page 1 of 1 (latest)

brisk harbor
#

I want to create a script to convert non-standard Materials to URP Materials. How can I "create" an URP material?

#

Found it

lavish narwhal
#

Wait, maybe just change the mat.shader. that way all the properties should stay the same I think (tho im not sure if all the properties are named the same on both shaders)

lavish narwhal
brisk harbor
lavish narwhal
brisk harbor
#

Custom shaders duh

lavish narwhal
brisk harbor
#

whatever shader

lavish narwhal
brisk harbor
#

wdym

lavish narwhal
#

I think you are currently wasting your time doing the impossible, if it was that easy, unity would obviously have done it already

brisk harbor
#

I literally marked the topic as Solved as I already did it

#

lmao

lavish narwhal
# brisk harbor I literally marked the topic as Solved as I already did it

You clearly didnt. You can replace any shader with lit shader but you for sure cannot convert them to lit shader as lit shader is just one type of shader, it cant do anything other than basic lighting with few properties like emission and stuff. Something like water shader is not gonna be convertable to lit shader

brisk harbor
#

jfc

#

Why do you keep wasting my time on already solved topic

#

Here,
Copy the main texture, normal texture, and color from a custom shader that URP doesn't support to the default Lit shader.

#

That's all

lavish narwhal
#

Got it, thats should be somewhat easy

brisk harbor
#

Yes. Cause it's already freaking solved.