aboutsummaryrefslogtreecommitdiff
path: root/MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs')
-rw-r--r--MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs b/MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs
new file mode 100644
index 0000000..0862d0a
--- /dev/null
+++ b/MultiplayerToolkit/Assets/com.rlabrecque.steamworks.net/Runtime/CallbackIdentity.cs
@@ -0,0 +1,35 @@
+// This file is provided under The MIT License as part of Steamworks.NET.
+// Copyright (c) 2013-2022 Riley Labrecque
+// Please see the included LICENSE.txt for additional information.
+
+// This file is automatically generated.
+// Changes to this file will be reverted when you update Steamworks.NET
+
+#if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX)
+#define DISABLESTEAMWORKS
+#endif
+
+#if !DISABLESTEAMWORKS
+
+namespace Steamworks {
+ class CallbackIdentities {
+ public static int GetCallbackIdentity(System.Type callbackStruct) {
+#if UNITY_EDITOR || UNITY_STANDALONE || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX
+ foreach (CallbackIdentityAttribute attribute in callbackStruct.GetCustomAttributes(typeof(CallbackIdentityAttribute), false)) {
+ return attribute.Identity;
+ }
+#endif
+ throw new System.Exception("Callback number not found for struct " + callbackStruct);
+ }
+ }
+
+ [System.AttributeUsage(System.AttributeTargets.Struct, AllowMultiple = false)]
+ internal class CallbackIdentityAttribute : System.Attribute {
+ public int Identity { get; set; }
+ public CallbackIdentityAttribute(int callbackNum) {
+ Identity = callbackNum;
+ }
+ }
+}
+
+#endif // !DISABLESTEAMWORKS