Example #1
0
        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);
        }
Example #2
0
 private void Start()
 {
     Debug.Log(test.Get <string>());
 }