Quantcast
Channel: Questions in topic: "attach"
Viewing all articles
Browse latest Browse all 168

Make sure file name and class name match

$
0
0
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?

Viewing all articles
Browse latest Browse all 168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>