if statement in a get function

So I’m working on a project with a camera where i have the camera but other team members don’t so i have 2 different object groups 1 virtual and 1 that works with the camera.
So I’m trying t make a index script that checks what your using and grabs all the info needed so are you using camera? grab fov from the camera, are you using virtual? grab fov virtual and set them as a get function
so what i tried was this:

public static float get_FOV(){
		if (virtuEnabled) {
			return CameraCapture.getfovY;
		} else {
			return MouseLook.getFOV;
		}     
	}

i also tried it like this:

public static float get_FOV {
		get {
			if (virtuEnabled) {
				return CameraCapture.getfovY;
			} else {
				return MouseLook.getFOV;
			}     
		}
	}

the virtuEnable is a bool set true or false depending what your using.
now the problem that im having is that it gives me this error
Assets/Scripts/varLibrary.cs(47,7): error CS0120: An object reference is required to access non-static member `varLibrary.virtuEnabled’
line 74 is refering to the if (virtuEnabled) {

any help in this matter would help alot!

That’s because you’ve declared the get_FOV function static, but the virtuEnabled variable it tries to access is not.

If this is meant to be a single, shared, class-level function, use the static modifier with both the get_FOV function and the virtuEnabled variable declaration. Alternatively, if this is meant to be an instance function, remove the static modifier from both.