Project
Beginner Gameplay Scripting
Arrays
Tutorial
Beginner
5 Mins
Unity Technologies
Overview
You have completed 0% of this Tutorial.
1.
Arrays
Summary
Using arrays to collect variables together into a more manageable form.
This tutorial is included in the Beginner Scripting project.
Previous: Instantiate
Next: Invoke
Language
English
Recommended Unity Versions
4 and Above
1.
Arrays
using UnityEngine; using System.Collections; public class Arrays : MonoBehaviour { public GameObject[] players; void Start () { players = GameObject.FindGameObjectsWithTag("Player"); for(int i = 0; i < players.Length; i++) { Debug.Log("Player Number "+i+" is named "+players[i].name); } } }

Woohoo! You nailed this tutorial.
Continue rocking your Beginner Gameplay Scripting project.
Next Step:
Invoke
Tutorial
Beginner
5 Mins
Unity Technologies