Obje Oluşturma kodu(object Creater)

Obje Oluşturma kodu(object Creater)
oluşmak ile ilgili görsel sonucu#pragma strict
// Instantiates 10 copies of prefab each 2 units apart from each other
// Bu Kod objenizden 10 Adet oluşturur.
public var prefab: Transform;
// Burada bir Transform değişkeni oluşturduk
function Start() {


 for (var i: int = 0; i < 10; i++) {
               // Burada 10 tane oluşturması için for kullandır
  Instantiate(prefab, new Vector3(i * 2.0F, 0, 0), Quaternion.identity);
 }
}

Yorumlar

Popüler Yayınlar