- Home /
How to update objects material on Editor
I have a method that changes the color of a level depending on its difficult (hard, easy..). When running (Game view) I see these color changes, but I'd like to see these changes directly on Editor (Scene view) too, when I change the difficult in Inspector panel.
Try attribute [ExecuteInEdit$$anonymous$$ode] to execute the script while editing.
Answer by MikeNewall · Jan 29, 2014 at 03:13 PM
One option is to write a custom inspector and call the code which changes the colour whenever the inspector GUI changed.
http://docs.unity3d.com/Documentation/Components/editor-CustomEditors.html
http://docs.unity3d.com/Documentation/ScriptReference/GUI-changed.html
Your answer
Follow this Question
Related Questions
Inspector Popup format to look like tag or layer popup 1 Answer
Make popup window in inspector if deleting GameObject 0 Answers
Drop down with sizes 1 Answer
ReImport in c# of GameObjects only for Scene Objects, not assets? 1 Answer
Drawing a custom variable in the inspector y position bugs selection 0 Answers