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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback