示例#1
0
        public unsafe UIVertexWrapper[] GetVerticesArray()
        {
            IntPtr intPtr = fd_GetVerticesArray(UnityInternals.ObjectBaseToPtrNotNull(this));

            if (intPtr == IntPtr.Zero)
            {
                return(null);
            }
            UIVertexWrapper[] arr = new UIVertexWrapper[UnityInternals.array_length(intPtr)];
            for (int i = 0; i < arr.Length; ++i)
            {
                arr[i] = new UIVertexWrapper((IntPtr)((long)intPtr + 4 * IntPtr.Size + i * UIVertexWrapper.sizeOfElement));
            }
            // arr[i] =  ( (UIVertex*)((long)intPtr + 4 * IntPtr.Size) )[i];
            // arr[i] = *( (UIVertex*)((long)intPtr + 4 * IntPtr.Size) + (i * sizeof(UIVertex)))
            return(arr);
        }