u can apply this script to ur camera
#pragma strict
var item1 : GameObject;
var item2 : GameObject;
var item3 : GameObject;
var Item;
var dropcount = 0;
function Update()
{
if(dropcount == 1)
{
Item = item1;
}
if(dropcount == 2)
{
Item = item2;
}
if(dropcount == 3)
{
Item = item3;
}
}
function OnGUI()
{
if(GUI.Button(Rect(250, 250, 100, 50), "Destroy"))
{
Destroy(Item);
}
if(GUI.Button(Rect(250, 200, 100, 50), "Spawn"))
{
Instantiate(Item);
}
if(GUI.Button(Rect(200, 150, 50, 50), "1"))
{
dropcount = 1;
}
if(GUI.Button(Rect(200, 200, 50, 50), "2"))
{
dropcount = 2;
}
if(GUI.Button(Rect(200, 250, 50, 50), "3"))
{
dropcount = 3;
}
}