summaryrefslogtreecommitdiff
path: root/Runtime/Network/PackMonoRPC.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Network/PackMonoRPC.h')
-rw-r--r--Runtime/Network/PackMonoRPC.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/Runtime/Network/PackMonoRPC.h b/Runtime/Network/PackMonoRPC.h
new file mode 100644
index 0000000..bd16900
--- /dev/null
+++ b/Runtime/Network/PackMonoRPC.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "Configuration/UnityConfigure.h"
+
+#if ENABLE_NETWORK
+
+#include "Runtime/Mono/MonoIncludes.h"
+#include "External/RakNet/builds/include/BitStream.h"
+#include "NetworkEnums.h"
+
+typedef void NetworkViewRpcFunc (RPCParameters *rpcParameters);
+
+bool UnpackAndInvokeRPCMethod (GameObject& target, const char* name, RakNet::BitStream& parameters, SystemAddress sender, NetworkViewID viewID, RakNetTime timestamp, Object* netview);
+bool PackRPCParameters (GameObject& target, const char* name, RakNet::BitStream& inStream, MonoArray* data, Object* netview);
+
+bool UnpackAndInvokeRPCMethod (MonoBehaviour& targetBehaviour, MonoMethod* method, RakNet::BitStream& parameters, SystemAddress sender, NetworkViewID viewID, RakNetTime timestamp, Object* netview);
+bool PackRPCParameters (MonoBehaviour& targetBehaviour, MonoMethod* method, RakNet::BitStream& inStream, MonoArray* data, Object* netview, bool doPack);
+
+#endif \ No newline at end of file