Hello, ![]()
I’m new to Unity and to scripting.(I don’t know much about JavaScript).
I try to desable the “MouseLook” from the main camera in order to get a still screen while displaying an interactive text.
My code ia as follow:
cameraObj = GameObject(“MainCamera”);
aScript = cameraObj.GetComponent(MouseLook);
aScript.enabled = false;
I obtain a NullReferenceException.
It would be kind if somebody could explain to me the
“Why” of this message and give me the right coding.
Many thanks.