Hi, I’m new. Firstly I’m sorry,because I can’t speak English well.
My problem is I wrote code but return didnt work please help me. I wrote the code under.
public GameObject convey;
void Start()
{
SpawnConveyor();
}
void Update()
{
}
public void SpawnConveyor()
{
for (int i = 0; i < 100; i++)
{
Instantiate(convey, transform.position + 1.6f * Vector3.up * i, Quaternion.identity);
if (i == 1000)
{
return;
}
}
}