The question is answered, right answer was accepted
I removed a variable from my script but it still shows up in the inspector,I removed a public int from my script yet it stills shows up in the inspector when looking at the script component
I already removed it yet it still shows up is this a bug?,yet it stills shows up in the inspector when looking at the script component.
I am sure its not there anymore and even if I try to change the int it doesn't affect the inspector. This has to be a bug.
Are you sure you don't have any compiler error in the console?
Have you changed the script during gameplay? Public variables get updated in the UI after the script is successfully recompiled
I'm having the same issue. Did you find a solution? Any clue as to what is causing this would be very helpful.
Answer by gvergidis · Aug 21, 2018 at 02:12 PM
Components do not refresh if there is a compiler error. Save the script, go to unity, wait for it to refresh. If the problem persists, check the console to see if any errors appear there.
I saved the script and it still didn't work. The variable wasn't updated in the inspector after the refresh and there were no compiler errors.