Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Changing material emission in editor via script - material won't update until selected

$
0
0
I'm trying to change a material's emission bool and emission color via script while in editor mode (not during runtime)

It doesn't look like there's a way to access the emission bool that I've found. The workaround, found elsewhere, is to set the bool to true, and set emission color to black when you want no emission.

This works, but only if I select the material. Otherwise it won't update.

How do I get the material to update via script?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>