Answers for "array in c# unity"

C#
7

unity array c#

string[ ] familyMembers = new string[]{"John", "Amanda", "Chris", "Amber"} ; 
 
string[ ] carsInTheGarage = new string[] {"VWPassat", "BMW"} ; 
 
int[ ] doorNumbersOnMyStreet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; 
 
GameObject[ ] carsInTheScene = GameObject.FindGameObjectsWithTag("car");
Posted by: Guest on April-12-2020
1

unity array c#

using System.Collections.Generic;
Posted by: Guest on April-12-2020
1

unity array c#

public string[] myArrayName = new string[4];
Posted by: Guest on April-12-2020
-1

unity array c#

new List();
Posted by: Guest on April-12-2020
0

array in c# unity

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);
        }
    }
}
Posted by: Guest on January-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language