Chaos::SaveLoadUtility

Serializes and loads ObjectToSave to memory and to disk, returning loaded versions in array for testing.

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/SerializationTestUtility.h

Include

#include "Chaos/SerializationTestUtility.h"

Syntax

namespace Chaos
{
    template<class T, class U>
    bool Chaos::SaveLoadUtility
    (
        U & ObjectToSave,
        TCHAR const * SerializedBinaryDirectory,
        TCHAR const * BinaryFolderName,
        bool bSave,
        TArray< U > & ObjectsToTest
    )
}

Remarks

Serializes and loads ObjectToSave to memory and to disk, returning loaded versions in array for testing. also loads and returns all binaries in test's subdirectory in SerializedBinaryDirectory. Used to test backwards compatibility for previous serialization formats.

Returns

  • False if fails to load a binary file, otherwse true. Should fail test on false.

Parameters

Parameter

Description

ObjectToSave

Data being tested. Will be saved and loaded, loaded copies returned for testing.

SerializedBinaryDirectory

Path to directory containing subfolders containing binaries to load for testing.

BinaryFolderName

Name of folder in SerializedBinarYDirectory for this test. Should not match name of other tests.

bSave

If true, ObjectToSave will be saved to SerialziedBinarY folder for testing in future. Should be false, temporarily flip to true to save.

ObjectsToTest

Returned Objects that were deserialized.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss