summaryrefslogtreecommitdiff
path: root/Runtime/Serialize/DumpSerializedDataToText.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Serialize/DumpSerializedDataToText.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Serialize/DumpSerializedDataToText.h')
-rw-r--r--Runtime/Serialize/DumpSerializedDataToText.h24
1 files changed, 24 insertions, 0 deletions
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 <iostream>
+#include "Runtime/Utilities/dynamic_array.h"
+
+class TypeTree;
+
+enum DumpOutputMode
+{
+ kDumpNormal,
+ kDumpClean,
+};
+
+void DumpSerializedDataToText (const TypeTree& typeTree, dynamic_array<UInt8>& 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
+