Values stored inside variables becomes corrupted after creating an FBufferArchive variable (FBufferVar), setting FBufferVar.ArForceByteSwapping = true; and then storing the original value in FBufferVar
float foo = 1234.56789e+20; FBufferArchive ar; UE_LOG( LogTemp, Warning, TEXT( "Original value: %g" ), foo ); ar << foo; UE_LOG( LogTemp, Warning, TEXT( "Before Serialization: %g" ), foo ); ar.ArForceByteSwapping = true; ar << foo; UE_LOG( LogTemp, Warning, TEXT( "After Serialization: %g" ), foo );
Result:
Original & Before serialization values are equal however the value of foo printed to the output log changes after setting ar.ArForceByteSwapping = true;
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
UMG RichText not appear image when packaged
How to delete some elements correctly when deleting an array loop?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
What controls of umg have mouse wheel events in UE4.27?
Why does UV setting float2(1,1) display incorrectly in the material's custom node?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.10 |
Created | Nov 16, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |