Didn’t anyone have this problem? Please help i moved to udk just because of this problem. But udk is really hard to understand for me.
I have a prefab and a script attached to it.
When i instantiate prefab in runtime with code the script doesn’t work properly.
But when i just put the prefab in the scene without code everything works fine.
Below script is attached to a cube that is where i want the prefab’s instantiate position
public static var notarray: Array;
var timearray: Array;
public static var i=0;
//i drag the prefab here in inspector view
var ob: Transform;
function Start () {
notarray=new Array();
timearray=new Array();
notarray.Add(ob);
timearray.Add(0);
notarray.Add(ob);
timearray.Add(1);
notarray.Add(ob);
timearray.Add(1);
notarray.Add(ob);
timearray.Add(1);
while(notarray.length>i){
yield WaitForSeconds(timearray*);*
Instantiate(notarray*,transform.position,transform.rotation);*
i++;
}
}
/// This question is edited because i understood there wont be any answers, maybe this time?