Distinct를 통한 배열, 리스트의 중복 제거 시 제거순서
중복된 값 중 뒷 인덱스의 값이 삭제된다. 고로 순서 정렬 후 중복 값 삭제 시 정렬 순서는 유지된다. public class Test1 : MonoBehaviour { List testList = new List(); // Start is called before the first frame update void Start() { testList = new List { new test( 2, 0.3f), new test( 2, 0.2f), new test( 0, 0.1f), new test( 3, 0.5f), new test( 3, 0.4f), new test( 1, 0.2f), }; foreach (test _test in testList) Debug.Log("정렬 및 중복제거 전 : " + _tes..
2022. 8. 19.