using System.Collections; using System.Collections.Generic; using UnityEngine; public class KoodiSkript : MonoBehaviour { public GameObject sabalyliNaidis; void Start() { GameObject eelmine=sabalyliNaidis; for(int i=0; i<10; i++){ GameObject uus=Instantiate(sabalyliNaidis, new Vector3(3, 0, 3), Quaternion.identity); uus.GetComponent().juhtObjekt=eelmine; eelmine=uus; } Debug.Log("loodud"); } // Update is called once per frame void Update() { } }