I'm fairly new at Unity, (and by fairly new I mean *VERY* new) and I got this error when writing the script for a... um... thing named Health_box. When I got the error, I changed the line to "public class Health_box : MonoBehavior" and saved it. I went back into Unity (im using Microsoft Visual Studio btw) and tried to attach the script to Health_box. However, because I changed the name of the class to Health_box instead of whatever I had before, I got a lot of errors on the screen, and of course this meant that I couldn't attach to script.
I need a way of changing the class without getting a bunch of errors, or at least a trick to allow me to attach the script even when there *are* errors. Anyone have any answers?
↧