Пример #1
0
        public List <T> FromNative(IntPtr nativeBuffer, int arrayIndex, IntPtr prop)
        {
            IntPtr scriptArrayAddress = nativeBuffer + (arrayIndex * Marshal.SizeOf(typeof(FScriptArray)));

            helper.Update(property);
            helper.Array = scriptArrayAddress;

            unsafe
            {
                FScriptArray *array  = (FScriptArray *)scriptArrayAddress;
                List <T>      result = new List <T>(array->ArrayNum);
                for (int i = 0; i < array->ArrayNum; ++i)
                {
                    result.Add(innerFromNative(array->Data, i, helper.InnerPropertyAddress));
                }
                return(result);
            }
        }
Пример #2
0
 public void ToNative(IntPtr nativeBuffer, IList <T> value)
 {
     helper.Update(property);
     ToNativeInternal(nativeBuffer, 0, value, ref helper, innerToNative);
 }