public static unsafe EntityPatchInfo *AppendEntityPatches(EntityPatchInfo *patches, TypeManager.EntityOffsetInfo[] offsets, int baseOffset, int stride) { EntityPatchInfo *infoPtr; if (offsets == null) { infoPtr = patches; } else { int index = 0; while (true) { if (index >= offsets.Length) { infoPtr = patches + offsets.Length; break; } patches[index] = new EntityPatchInfo { Offset = baseOffset + offsets[index].Offset, Stride = stride }; index++; } } return(infoPtr); }
public static EntityPatchInfo *AppendEntityPatches(EntityPatchInfo *patches, EntityOffsetInfo *offsets, int offsetCount, int baseOffset, int stride) { if (offsets == null) { return(patches); } for (int i = 0; i < offsetCount; i++) { patches[i] = new EntityPatchInfo { Offset = baseOffset + offsets[i].Offset, Stride = stride } } ; return(patches + offsetCount); }