Re: [程式] 請教 Unity3D script中 Generic List寫法

看板GameDesign作者 (統一獅總冠軍)時間12年前 (2012/06/24 08:45), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
在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
文章代碼(AID): #1FvcCSkC (GameDesign)
文章代碼(AID): #1FvcCSkC (GameDesign)