ํด๋ ์ค๋ช ์ ๋๊ฐ ์ง์ ์ง๋๊ฐ
TestA
----
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class TestA<T> : IList
{
ย ย [SerializeField]
ย ย List<T> m_List;
ย ย public object this[int index] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
ย ย public bool IsFixedSize => throw new NotImplementedException();
ย ย public bool IsReadOnly => throw new NotImplementedException();
ย ย public int Count => throw new NotImplementedException();
ย ย public bool IsSynchronized => throw new NotImplementedException();
ย ย public object SyncRoot => throw new NotImplementedException();
ย ย public int Add(object value)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public void Clear()
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public bool Contains(object value)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public void CopyTo(Array array, int index)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public IEnumerator GetEnumerator()
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public int IndexOf(object value)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public void Insert(int index, object value)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public void Remove(object value)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
ย ย public void RemoveAt(int index)
ย ย {
ย ย ย ย throw new NotImplementedException();
ย ย }
}
//
์๋ฆฌ์ผ๋ก ์ ๊ทํ ์ํค๊ณ ํ ํ๋ฆฟ์ผ๋ก ํด๋ ์ค ๋ง๋ค์ด์ ์ ๋ํฐ์์ ์ ๊ทํํด์ ์ธ์ํ ์ ์๊ฒ ํด๋ผ ใ ใ ? ์ด๊ฑธ๋ก ๋ฆฌ์คํธ ๊ธฐ๋ฐ์ ์ก๋๋ค.
--------
aaa ํด๋ ์ค ์คํฌ๋ฆฝํธ ํ๋ ๋ง๋ ๋ค์
๋ชจ๋ ธ๋ฅผ ์์๋ฐ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๋๊ฐ ์ง์ด๋ฃ์ ํ์ ์ ๋ง๋ค์ด ๋ฃ๋๋ค ์์ ์๋ฆฌ์ผ๋ก ใ ใ ?
---
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class Data
{
ย ย public int a;
ย ย public string b;
}
public class aaa : MonoBehaviour
{
ย ย public TestA<Data> dataList;
}
์ด๋ ๊ฒ ์ ๊ทํ๋๊ฒ ๋์จ๋ค ์๊ฒ ์?ย
๋๊ฐ ์ํ๋ ์ปค์คํ ์๋ํฐ์์ ์ปค์คํ ๋ ์์ฐ๊ณ ๋ฆฌ์คํธ ๋ฃ์ด๋จ๋ค
๋ญ์๋ฆฌ๊ฐ ํ๊ณ ์ถ์๊ฑฐ์ ์ด์ฝ๋๋ ๋ฆฌ์คํธ ์์ฒด๋ก ์ง๋ ฌํ๊ฐ ๋๋๋ฐ ์ ๊ตณ์ด ๋ฐ๋ก ๋ง๋ฌ?
์ ์ปค์คํ ํ๋กํผํฐ ๋๋ก์๋ฅผ ๋ฆฌ์คํธ์ ์ฐ๊ณ ์ถ๋ค๋ ๋ง์ธ๊ฐ? ๋ฐ์๊ธ์ ์๋ณด๊ณ ์๋ค