CameraAim Error : NullReferenceException

My ballSpawner script is not finding my CameraAim component for some reason. I have tried to follow along very carefully, but at one point I had my cameraAim component named as Camera Aim, and with the space this was not allowed as a Class name however it go stuck in there and I could not make it go away. I had to recreate the BallSpawner game object, re-create the CameraAim script, watch the lessons again to re-create the code, and it is still not working. Please, can anyone help? I wish there was a way that we could colaborate online. I know that this problem is deep somewhere, maybe in the Unity project file, which keeps holding onto stuff that I’ve deleted.

James McLain

Please, this is a cool project. I want it to work.

A NullReference exception usually occurs because something needs to be dragged into the inspecter in Unity after making a variable public.

Maybe you need to drag the camera in or something?

Privacy & Terms