Check if emission is enabled in URP Lit Shader from C# script
Hey,
I've searched everywhere on the internet but I can't seem to find a way to check in C# if emission is enabled on a material with the Universal Render Pipeline/Lit shader on it. "Enabled" as to reflect the toggle state in the inspector.
I've already tried calling IsKeywordEnabled on "_EMISSION" but unfortunately the state of the toggle is completely unrelated to the enabled state of the keyword. Calling EnableKeyword/DisableKeyword on the keyword enables/disables the emission though (but does nothing to the toggle in the inspector).
Any help is deeply appreciated :)
Your answer
Follow this Question
Related Questions
How can i make a tiled/striped texture on a sphere ? (see example below) 0 Answers
Change alpha on material with custom shader 0 Answers
Highlighting Multiple Objects with an Outline Shader 0 Answers
Accessing shader colors 1 Answer
How to know whether material's emission is enabled or not by C# script? 0 Answers