[revert] 回滚版本"6909c32a0c8fcf11d4b573af890a0232c1525afe [new] 支持 2021 WebGL资源上挂载脚本" 引入的MonoHook的bug
parent
1d5f2a953c
commit
2ff3e276d2
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DotNetDetour
|
||||
{
|
||||
|
@ -641,15 +642,8 @@ namespace DotNetDetour
|
|||
if(s_isArm.HasValue)
|
||||
return s_isArm.Value;
|
||||
|
||||
string processorType = UnityEngine.SystemInfo.processorType;
|
||||
|
||||
/*
|
||||
* appple M 系列
|
||||
* SystemInfo.processorType 返回值为: Apple M1 Max, Apple M2 等
|
||||
* SystemInfo.operatingSystem 返回值为: Mac OS X xx.x.x
|
||||
*
|
||||
*/
|
||||
s_isArm = processorType.Contains("ARM") || processorType.Contains("Apple M");
|
||||
var arch = RuntimeInformation.ProcessArchitecture;
|
||||
s_isArm = arch == Architecture.Arm || arch == Architecture.Arm64;
|
||||
|
||||
return s_isArm.Value;
|
||||
}
|
||||
|
|
|
@ -363,8 +363,14 @@ namespace MonoHook
|
|||
{
|
||||
if (s_fi_GUISkin_current.GetValue(null) != null)
|
||||
{
|
||||
DoInstall();
|
||||
EditorApplication.update -= OnEditorUpdate;
|
||||
try
|
||||
{
|
||||
DoInstall();
|
||||
}
|
||||
finally
|
||||
{
|
||||
EditorApplication.update -= OnEditorUpdate;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue