728x90
Unity Array
-
Unity Array List Dictionary3D/Unity 2022. 10. 10. 17:24
Unity Array List Dictonary 1. Array using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Test : MonoBehaviour { // 배열 선언 방법 // 데이터형식[] 배열이름 = new 데이터형식[크기] public Item[] items = new Item[] { new Item(3, "carot"), new Item(2, "banana"), new Item(1, "apple"), new Item(4, "apple") }; void Start() { Array.Sort(items, (x,y) => x.code.CompareTo(y.co..