Unity 3d spawn a prefab

Опубликовано: 27 Июль 2026
на канале: Dubravko Miter
1,670
2

Making free platform game ! One man show
---------------------------------------­­---------------------------------------­-­---------------------------------------------------
Javascrip: GOOD 4 2D GAMES AND 3D GAMES !
---------------------------------------­­---------------------------------------­-­---------------------------------------------------

var node1 : Transform;
var block : GameObject;
var spawning : boolean = true;

function Start () {
spawnBlock();
}

function Update () {

}

function spawnBlock () {

while(spawning) {
yield WaitForSeconds(1);
Instantiate(block,node1.transform.position,node1.transform.rotation);
}
}




---------------------------------------------------------------------------------

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

--------------------------------------

Artist's Links:
Virtual Riot - Energy Drink

  / virtualriotmusic  
  / virtual-riot