Hey guys,
Im trying to switch views in game from the Main Camera to the 1st Person Controller, I have it set up so that the Main Camera is Enabled at the start and the 1st Person is Disabled, But I Get This Error Cannot convert ‘boolean’ to ‘UnityEngine.GameObject’. here is my simple script,
#pragma strict
var mainCamera : Camera;
var firstPerson : GameObject;
function Start ()
{
mainCamera.enabled = true;
firstPerson.SetActive(false);
}
function OnMouseDown ()
{
ChangeCamera();
}
function ChangeCamera()
{
mainCamera.enabled = !mainCamera.enabled;
firstPerson = !firstPerson.SetActive(!true);
}
im getting the error on Line 20… firstPerson = !firstPerson.SetActive(!true);
Any help would be much appreciated, Thank You.