- Home /
Work in Editor but not in Built
Hey Guys i made a spawnscript wich works fine in editor but when i build webplayer fo example it dosent work can you plss help me thanks in advance
my Code:
var enemy : Transform;
var amountEnemies = 5;
var lvl = 1;
static var multiplicator = 3;
var speedmult = 0;
function Update()
{
speedmult = multiplicator;
multiplicator = 2 + Time.time * 0.01;
if(GameObject.Find("Enemy(Clone)") == false && Time.time > 5)
{
Invoke("Up",0);
amountEnemies += 5;
lvl += 1;
}
else
{
CancelInvoke();
}
}
function Up()
{
for(i=0;i<amountEnemies;i++)
{
var pos=Vector3(Random.Range(11.33826,79),40,Random.Range(26.96444,26.96444));
Instantiate(enemy,pos,transform.rotation);
}
}
Comment
Your answer
Follow this Question
Related Questions
Weird behaviour in standalone but not in editor 1 Answer
Player colliding with Ball problem. 0 Answers
Invoke doesn't work when with certain second 0 Answers
Select and deselect in Editor via C# 1 Answer
Play animations in editor 0 Answers