Hello,
i don´t know how to check if the gameobject is already there?
This is my script for spawning the gameobject:
// The object to be spawned
var SpawnObject : GameObject;
// in seconds
var SpawnStartDelay : float = 0;
var SpawnRate: float = 120.0;
function Start()
{
InvokeRepeating("Spawn", SpawnStartDelay, SpawnRate);
}
// Spawn the SpawnObject
function Spawn()
{
Instantiate(SpawnObject, transform.position, transform.rotation);
}
How can i improve the scrip, that it only spawns the object when the gameobject is not there, but when it´s there that i doesn´t spawn the gameobject?
Thanks:)