Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers > API/Runtime/Core/Containers/TArray
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include | #include "Containers/Array.h" |
void BulkSerialize
&40;
FArchive & Ar,
bool bForcePerElementSerialization
&41;
Remarks
Bulk serialize array as a single memory blob when loading. Uses regular serialization code for saving and doesn't serialize at all otherwise (e.g. transient, garbage collection, ...).
Requirements:
- T's << operator needs to serialize ALL member variables in the SAME order they are layed out in memory.
- T's << operator can NOT perform any fixup operations. This limitation can be lifted by manually copying the code after the BulkSerialize call.
- T can NOT contain any member variables requiring constructor calls or pointers
- sizeof(ElementType) must be equal to the sum of sizes of it's member variables.
- e.g. use pragma pack (push,1)/ (pop) to ensure alignment
- match up uint8/ WORDs so everything always end up being properly aligned
- Code can not rely on serialization of T if neither IsLoading() nor IsSaving() is true.
- Can only be called platforms that either have the same endianness as the one the content was saved with or had the endian conversion occur in a cooking process like e.g. for consoles.
Notes:
- it is safe to call BulkSerialize on TTransArrays
IMPORTANT:
- This is Overridden in XeD3dResourceArray.h Please make certain changes are propagated accordingly
Parameters
| Name | Description |
|---|---|
| Ar | FArchive to bulk serialize this TArray to/from |