Unity ignores changes to scripts attached to GameObjects

Hi, i’m quite new to Unity and have been learning it while following along with a tutorial project. However, I’ve run into a major issue. When I first create a script, fill it in with the proper code and attach it to a GameObject, the script works as expected. However, changing the variables implemented in the script through the Unity inspector does not appear to change anything. Additionally, when I add new code to a previously created script attached to a GameObject, the new code does not seem to have any effect on the behaviour of the GameObject. It still shows up when I view the script using the inspector, but it just doesn’t do anything. I’ve tried restarting my computer, deleting my ScriptAssemblies file and making sure that the AutoRefresh checkbox is checked, but the problem persists. Any advice on this would be greatly appreciated. Thanks in advance!

Hi @CTDoodles

Can you post the code for your component and explain in more detail how you’re expecting the behaviour to change in response to the changes you’re making through the inspector? Most likely there’s some mistake in your code which is causing this unexpected behaviour.

If your Console is showing compile errors that could also explain why new code changes are having no effect. However, since you’re seeing new elements appear in the inspector after making code changes I don’t think this is the cause of the issue in this case.