public static List <T> GetList <T>(this PropertyReference propertyReference) { var iList = (IList)propertyReference.Get <object>(); if (iList == null) { return(null); } var list = new List <T>(); var listEnum = iList.GetEnumerator(); while (listEnum.MoveNext()) { var newItem = (T)listEnum.Current; if (newItem != null) { list.Add(newItem); } } return(list); }
private void Start() { Debug.Log(test.Get <string>()); }