im trying to enable a component in c# but i dont know what the correct code is to enable a component. im using this:
if(GUI.Button(new Rect(50, 100, 183, 25), "Restart Level")){
Application.LoadLevel("Training Layout");
Time.timeScale = 1.0f;
player.GetComponent<MouseLook>.enabled = true;
cam.GetComponent<MouseLook>.enabled = true;
cam.GetComponent<ShowSkin>.enabled = false;
}
but it says that enabled is an unknown command. what is the correct syntax to enable or disable a component in c#?