Error : A field initializer cannot reference the nonstatic field, method, or property

Here is the script :

using UnityEngine;

using System.Collections;

public class Cube_01 : MonoBehaviour
{

public GameObject C1;
GameObject Camera_Man = GameObject.Find ("Camera_Man");
CubeChange Cube1 = Camera_Man.GetComponent<CubeChange> ();

void Start ()
{
	C1.activeSelf = false;

}

void Update ()
{

	if (Cube1.CubeNumber = 1) {
		C1.activeSelf = true;
	}

}

}
I am trying to make a game where when a button is pressed It makes one object active and all the rest inactive.

BUT,

I get the error : A field initializer cannot reference the nonstatic field, method, or property `Cube_01.Camera_Man’

Ive looked up a couple of ways how to solve this and all of the fixes I saw were to put :

GameObject Camera_Man = GameObject.Find (“Camera_Man”);
CubeChange Cube1 = Camera_Man.GetComponent ();

Into the start Method. Unfortunately when I do that I get a whole different set of errors.

Thank you for your time

Brandon.

You cannot run code like Find or GetComponent outside of the method, inside the class declaration. Try to move it to start method like this

public GameObject C1;
	GameObject Camera_Man; 
	CubeChange Cube1;
	
	void Start ()
	{
		Camera_Man = GameObject.Find ("Camera_Man");
		Cube1 = Camera_Man.GetComponent<CubeChange> ();
		C1.setActive(false); //if this is what you meant 
		
	}