Created
September 5, 2020 22:06
-
-
Save leventeren/bead295204065b5ddb60ffc4ddbe2a42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Arrays : MonoBehaviour { | |
public string[] familyMembers = new string[]{"Dharma","Greg","Zen","Karma","Serenity"}; | |
public int[] numbers; | |
void Start(){ | |
numbers[0] = 1; | |
numbers[1] = 2; | |
numbers[2] = 3; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Lists : MonoBehaviour { | |
public ArrayLists inventory = new ArrayList(); | |
void Start(){ | |
inventory.Add("Fish"); | |
inventory.Add(10); | |
inventory.Add(GameObject.Find("Player"); | |
inventory.Add("Sword"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Lists : MonoBehaviour { | |
public Hashtable friends = new Hashtable(); | |
void Start(){ | |
friends.Add("firstName", "Fish"); | |
Debug.Log((string)personalDetails["firstName"]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Lists : MonoBehaviour { | |
public List<string> familyMembers = new List<string>(); | |
void Start(){ | |
familyMembers.Add("Bob"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment