- Home /
Unity has stopped dynamically displaying changes via the inspector while in the game view.
Hello
Another noob question. I think I might have toggled an option somewhere accidentally but when I change values in the inspector (such as a variable for the position of a GUI label) it is not changing and showing dynamically to the game screen when I run my scene. I thought this would be a fairly famous question by now but alas, no luck.
So, how do I enable dynamic changes to data in the game view in run time?
Thanks
Any change to the values in the inspector should always be reflected in the game. So without seeing your code, I can only guess why your changes aren't reflected in the game. Are you actually using the variable in the code? You might have public int x; but then use a constant in your GUI label: GUI.Label(new rect (0,0,100,100));
Hey there. Sorry I didn't post current code. I didn't add it earlier because I was so sure it was some kind of tool/button in the unity developer that disabled or enabled dynamic changes to the game view. Here is my code: //inspector variables var labelRight :float = 75; //spaces the label to the right. used for aligning
function OnGUI()
{
//left, top,width, height
GUI.Label(Rect(Screen.width -labelRight,10,100,20), "Time: "+ gameTime);
}
When I edit the value of labelRight via the inspector, it does not update the game view at all.
Answer by Slobdell · Jul 14, 2013 at 08:43 PM
You are probably setting the value in your script somewhere. So when you change the value, and fire up your scene, it changes it right back. You should either just declare the variable in the class and not set a value if you want to only set it in the inspector. Or, you can set the value when you declare the value. But don't change the value in your start function. Does that make sense?
Your answer
![](https://koobas.hobune.stream/wayback/20220613110103im_/https://answers.unity.com/themes/thub/images/avi.jpg)