作者fsyoung (统一狮总冠军)
看板GameDesign
标题Re: [程式] 请教 Unity3D script中 Generic List写法
时间Sun Jun 24 08:45:14 2012
在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