【m】hybrid更新为8.11.0
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 5s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 8s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 34s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 2s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 5s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 17s
Plugin Library CI / publish (07.RKTools) (push) Successful in 4s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 17s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 4s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 3s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 5s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 8s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 34s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 2s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 5s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 17s
Plugin Library CI / publish (07.RKTools) (push) Successful in 4s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 17s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 4s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
This commit is contained in:
@@ -3,6 +3,7 @@ using HybridCLR.Editor.Meta;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
@@ -26,6 +27,19 @@ namespace HybridCLR.Editor.MethodBridge
|
||||
}
|
||||
}
|
||||
|
||||
private CallingConvention GetCallingConvention(MethodDef method)
|
||||
{
|
||||
switch (method.ImplMap.CallConv)
|
||||
{
|
||||
case PInvokeAttributes.CallConvWinapi: return CallingConvention.Default;
|
||||
case PInvokeAttributes.CallConvCdecl: return CallingConvention.C;
|
||||
case PInvokeAttributes.CallConvStdCall: return CallingConvention.StdCall;
|
||||
case PInvokeAttributes.CallConvThiscall: return CallingConvention.ThisCall;
|
||||
case PInvokeAttributes.CallConvFastcall: return CallingConvention.FastCall;
|
||||
default: return CallingConvention.Default;
|
||||
}
|
||||
}
|
||||
|
||||
public void Run()
|
||||
{
|
||||
foreach (var mod in _rootModules)
|
||||
@@ -40,7 +54,11 @@ namespace HybridCLR.Editor.MethodBridge
|
||||
{
|
||||
Debug.LogError($"PInvoke method {method.FullName} has unsupported parameter or return type. Please check the method signature.");
|
||||
}
|
||||
_pinvokeMethodSignatures.Add(new CallNativeMethodSignatureInfo { MethodSig = method.MethodSig });
|
||||
_pinvokeMethodSignatures.Add(new CallNativeMethodSignatureInfo
|
||||
{
|
||||
MethodSig = method.MethodSig,
|
||||
Callvention = method.HasImplMap? GetCallingConvention(method) : (CallingConvention?)null,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user