Instantiate(prefeb[prefeb_num], teleport[0].position, teleport[tele_num].rotation );
How can I define this instantiate as a variable?
Instantiate(prefeb[prefeb_num], teleport[0].position, teleport[tele_num].rotation );
How can I define this instantiate as a variable?
GameObject instantiatedObject = Instantiate(prefeb[prefeb_num], teleport[0].position, teleport[tele_num].rotation ) as GameObject;
Now you have your object as variable of type GameObject.