mirror of
https://github.com/electronicarts/CnC_Remastered_Collection.git
synced 2025-08-11 00:24:14 +02:00
C&C Remastered Map Editor
Initial commit of C&C Remastered Map Editor code
This commit is contained in:
35
CnCTDRAMapEditor/Steamworks.NET/CallbackIdentity.cs
Normal file
35
CnCTDRAMapEditor/Steamworks.NET/CallbackIdentity.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
// This file is provided under The MIT License as part of Steamworks.NET.
|
||||
// Copyright (c) 2013-2019 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_ANDROID || UNITY_IOS || UNITY_TIZEN || UNITY_TVOS || UNITY_WEBGL || UNITY_WSA || UNITY_PS4 || UNITY_WII || UNITY_XBOXONE || UNITY_SWITCH
|
||||
#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
|
Reference in New Issue
Block a user