WEEK: 5
Active: September 14th - September 20th
Work Due: September 21st @ 11:59PM

Multiple Prefabs

In this section, we want look at how to add multiple prefabs. In order to do that, we must create a list of prefabs


 private List<GameObject> arPrefab;

Then, we want to create an array of GameObjects instances


private GameObject[] arInstance;

Check for touch and Iterate

Finally, let’s add a boolean to check to see if the screen has been touched and iterate through our array. Don’t worry; we will revisit this later!


private bool isTouched = false;
private int index = 0;


Previous section:
Next section: