Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity initialize array

using UnityEngine;
 using System.Collections;
 
 public class Label : MonoBehaviour {
     int lives = 5;
     public int[] results = new int[] {15, 1645, 135, 567};
     // Use this for initialization
     void Start () {
         Debug.Log(results[1]);
     }
     
     // Update is called once per frame
     void Update () {
         
     }
 }
 
PREVIOUS NEXT
Tagged: #unity #initialize #array
ADD COMMENT
Topic
Name
6+6 =