From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- .../MonoBehaviourSerialization_ByCodeGeneration.h | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Runtime/Mono/MonoBehaviourSerialization_ByCodeGeneration.h (limited to 'Runtime/Mono/MonoBehaviourSerialization_ByCodeGeneration.h') diff --git a/Runtime/Mono/MonoBehaviourSerialization_ByCodeGeneration.h b/Runtime/Mono/MonoBehaviourSerialization_ByCodeGeneration.h new file mode 100644 index 0000000..a4c58cb --- /dev/null +++ b/Runtime/Mono/MonoBehaviourSerialization_ByCodeGeneration.h @@ -0,0 +1,58 @@ +#pragma once + +#include "UnityPrefix.h" + +#include "MonoBehaviour.h" +#include "MonoScript.h" +#include "MonoManager.h" +#include "Runtime/Scripting/ScriptingUtility.h" +#include "Runtime/Scripting/CommonScriptingClasses.h" +#include "Runtime/Math/AnimationCurve.h" +#include "Runtime/Math/Gradient.h" +#include "Runtime/IMGUI/GUIStyle.h" + +#if UNITY_WINRT +#define SCRIPTINGOBJECTWRAPPER long long +#define SERIALIZATION_SCRIPT_CALL_CONVENTION WINAPI +#else +#define SCRIPTINGOBJECTWRAPPER ScriptingObjectPtr +#define SERIALIZATION_SCRIPT_CALL_CONVENTION +#endif + + +#if ENABLE_SERIALIZATION_BY_CODEGENERATION + +SCRIPT_BINDINGS_EXPORT_DECL int SERIALIZATION_SCRIPT_CALL_CONVENTION GetCurrentSerializationStreamPosition(); +SCRIPT_BINDINGS_EXPORT_DECL SCRIPTINGOBJECTWRAPPER SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_GetNewInstanceToReplaceOldInstance(int oldInstanceID); + +// Reader +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReaderAlign(); +SCRIPT_BINDINGS_EXPORT_DECL unsigned char SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadByte(); +SCRIPT_BINDINGS_EXPORT_DECL char SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadBool(); +SCRIPT_BINDINGS_EXPORT_DECL int SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadInt(); +SCRIPT_BINDINGS_EXPORT_DECL float SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadFloat(); +SCRIPT_BINDINGS_EXPORT_DECL double SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadDouble(); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadBuffer(int ptr, int size); +SCRIPT_BINDINGS_EXPORT_DECL ScriptingStringPtr SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadString(); +SCRIPT_BINDINGS_EXPORT_DECL SCRIPTINGOBJECTWRAPPER SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadUnityEngineObject(); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadGUIStyle(GUIStyle* style); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadGradient(GradientNEW* gradient); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadAnimationCurve(AnimationCurve* animation_curve); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_ReadRectOffset(RectOffset* offset); + +// Writer +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriterAlign(); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteByte(unsigned char value); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteBool(int value); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteInt(int value); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteFloat(float value); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteDouble(double value); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteBuffer(int ptr, int size); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteString(char* value, int size); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteUnityEngineObject(int instance_id); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteGUIStyle(GUIStyle* style); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteGradient(GradientNEW* gradient); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteAnimationCurve(AnimationCurve* animation_curve); +SCRIPT_BINDINGS_EXPORT_DECL void SERIALIZATION_SCRIPT_CALL_CONVENTION NativeExt_MonoBehaviourSerialization_WriteRectOffset(RectOffset* offset); + +#endif -- cgit v1.1-26-g67d0