I think the script itself is fine so I won't upload it.
I thought I could drag and drop my script into the Inspector. When I attempted to create a new script Unity opened visual studio and wanted a new script. So I closed VS, deleted my old script from unity and tried to start again. After that I had to change the name of my variables and got the error above. Is there any way of making Unity forget all previous scripts?
↧