c# - Spawn after throw in unity -
i want object respawn after 1 second when throw object air.i tried below code cant figure out solution.if please me solving problem!
public transform[] spawnpoints; public gameobject ball; public gameobject lastball; void update(){ { int spawnindex = random.range (0, spawnpoints.length); lastball = instantiate (ball, spawnpoints [spawnindex].position, spawnpoints [spawnindex].rotation) gameobject; } }
Comments
Post a Comment