- Home /
Changing Emission Scale UI with Script
GetComponent().material.SetFloat ("_EmissionScaleUI", 5f);
The above code changes it in the inspector, but does not change it in the Scene. However, if I change it in the inspector manually then it changes in the Scene. Can anybody explain this phenomenon?
I am also calling this on Start GetComponent().material.EnableKeyword ("_EMISSION");
Comment
Your answer
Follow this Question
Related Questions
Changing two different objects renderer colour 1 Answer
How can I make a transparent ground, that hides other objects beneath it? 1 Answer
How can i change detail texture? 1 Answer
Building a Unity 5 Standard Material at runtime 3 Answers
Can I access the Material of an animated object via code? 1 Answer