how to get the child of an instanteated object

i have a rocket that i create and there is a camera inside of it i want to be able to enable and disable that camera

		if (GUI.Button(Rect(450,280,80,80),"Rockets"))
	{
		
					
			var bullit = Instantiate(rocketpref, GameObject.Find("rs").transform.position, Quaternion.identity);
		
		
		
		
	}
	if (GUI.Button(Rect(350,280,80,80),"cam"))
	{
		var newcam = bullit.Find("rocket/Camera").camera;	
		//var child = GameObject.Find("/Camera").camera;			
		if(newcam){ print("found");}
		//newcam.depth=1;
		
	}
}

If the camera is a child of bullit, you can access that component that way :

var cam : Camera = bullit.GetComponentInChildren.< Camera >();

(Edit : I usually program in C# but I try to write things in javascript here. But I mixed them both here, sorry about that !)

Code! To disable a camera that is the child of an object! In both UnityScript and C#!

var childCam : Camera = bullit.GetComponentInChildren.<Camera>();
if(childCam != null)
{
    childCam.enabled = false;
}

Camera childCam = bullit.GetComponentInChildren<Camera>();
if(childCam != null)
{
    childCam.enabled = false;
}

If you can’t tell which is which, you need to do a little more homework.