I’m trying to make a pause menu and I need to camera to stop moving so the player can click on the options in the menu. To do that I was trying to disable the Mouse Look script attached to the camera. I’ve seen it done in JavaScript by
GameObject.Find("Main Camera").GetComponent(MouseLook).enabled = false;
But in C# I’m getting an error on “enabled”:
error CS0117: 'UnityEngine.Component' does not contain a definition for 'enabled'
So how do I disable the MouseLook script on a camera in C#?