About 2 weeks ago I purchased a brand new iMac from the Apple store specifically to get more serious with my coding.
In two different classes now, both provided by GameDev.tv, when I download scripts and import them into unity, I run into a problem that is really getting to me. When I attempt to attach a script to an object, sometimes (yes, not all the time), I get an error. At the moment, this is happening when I attempt to attach CameraRaycast.CS to my Camera Arm. I have not edited the script in anyway, I’ve only imported it as requested by Ben, and am trying to attach it. Here is the error:
“Can’t add script behaviour VisualContainerAsset. The script needs to derive from MonoBehaviour!”
I’ve searched for hours, tried countless bug fixes as reported by others, uninstalled and reinstalled Visual Studio, Monobehaviour, etc. It still occurs. There is a line in the script that reads
“public class CameraRaycaster : MonoBehaviour”
I don’t know if something is off here, but I’m fairly new to programming and about at my wits end. Please help! I’m fast to respond and truly eager to get past this problem. When I took these courses on a PC I had no problems at all and finished one of the Unity courses in its entirety.