Hello, I'm trying to adjust the mouse sensitivity of the First Person Controller using a slider in game. Here's the code I'm using:
Here's the error I'm getting:
I'm trying to adjust the mouse sensitivity of the First Person Controller using a slider in game.
Code (csharp):
- GetComponent(MouseLook).sensitivityX = GetComponent(MouseLook).sensitivityY = GUI.HorizontalSlider(new Rect(0,0,200,50), GetComponent(MouseLook).sensitivityX, 1, 20);
Code (csharp):
- NullReferenceException: Object reference not set to an instance of an object...