Re: [程式] 請教 Unity3D script中 Generic List寫法
在answers.unity 有人給答案了
Unity 不支援 Generic Type
http://answers.unity3d.com/questions...he-editor.html
http://answers.unity3d.com/questions...-generics.html
謝謝曾經給予協助的朋友 :)
※ 引述《fsyoung (統一獅總冠軍)》之銘言:
: [SerializeField]
: public class Gen<T>
: {
: public T foo;
: }
: public class CTest : MonoBehaviour
: {
: public Gen<int> T1;
: public List< Gen<int> > T2;
: }
: 想請問一下有研究 unity3d script 的先進
: 這樣的寫法可以用在 unity上嗎?
: 雖然unity沒顯示錯誤,但是就是不能使用
: 還是我遺落什麼關鍵?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.254.120.44
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):