From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Serialize/DumpSerializedDataToText.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Runtime/Serialize/DumpSerializedDataToText.h (limited to 'Runtime/Serialize/DumpSerializedDataToText.h') diff --git a/Runtime/Serialize/DumpSerializedDataToText.h b/Runtime/Serialize/DumpSerializedDataToText.h new file mode 100644 index 0000000..f78cb81 --- /dev/null +++ b/Runtime/Serialize/DumpSerializedDataToText.h @@ -0,0 +1,24 @@ +#pragma once + +#ifndef UNITY_INCLUDE_SERIALIZATION_DUMP +#define UNITY_INCLUDE_SERIALIZATION_DUMP 0 +#endif + +// Debugging functions that dump the state of an object or typetree/bytearray to stdout +// Used in BinaryToTextFile by defining UNITY_INCLUDE_SERIALIZATION_DUMP +#if UNITY_EDITOR || UNITY_INCLUDE_SERIALIZATION_DUMP || DEBUGMODE +#include +#include "Runtime/Utilities/dynamic_array.h" + +class TypeTree; + +enum DumpOutputMode +{ + kDumpNormal, + kDumpClean, +}; + +void DumpSerializedDataToText (const TypeTree& typeTree, dynamic_array& data); +void RecursiveOutput (const TypeTree& type, const UInt8* data, int* offset, int tab, std::ostream& os, DumpOutputMode mode, int pathID, bool doSwap, int arrayIndex); +#endif + -- cgit v1.1-26-g67d0