- Home /
How do I make script parameter changes visible on edit time?
I have an object (a trapezoid) whose shape is controlled by a script (it has parameters that define the width of the top and the bottom). This script also has code in its FixedUpdate function that alters the coordinates of the object's mesh's vertices.
If I play my game in the Unity editor and tweak the script parameters, I can see the shape change just fine, but if I try to tweak the script parameters outside of play mode, nothing changes.
Is there a way to make the changes visible outside of play mode?
If you found an answer please place it as an answer ins$$anonymous$$d of a comment. That way people can find answers when they need it and people won't continue to view the question trying to help answer it. Thanks!
Sorry, it was my first time posting. I will do as you suggested from here on out. Thank you.
Answer by pedroahpolonio · Oct 11, 2015 at 03:29 PM
Found my answer. I could have written my code in the OnRenderObject function and added [ExecuteInEditMode] to my script. Another possibility would have been to wrap my logic in an "if (!Application.IsPlaying)" condition.
Answer by pedroahpolonio · Oct 11, 2015 at 02:06 AM
EDIT: Found the answer. Should have written my code in the OnRenderObject function and added [ExecuteInEditMode] to my script.
Your answer
![](https://koobas.hobune.stream/wayback/20220612040841im_/https://answers.unity.com/themes/thub/images/avi.jpg)