[revert] 回滚版本"6909c32a0c8fcf11d4b573af890a0232c1525afe [new] 支持 2021 WebGL资源上挂载脚本" 引入的MonoHook的bug

main
walon 2023-03-28 13:20:34 +08:00
parent 1d5f2a953c
commit 2ff3e276d2
2 changed files with 11 additions and 11 deletions

View File

@ -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;
}

View File

@ -362,11 +362,17 @@ namespace MonoHook
private void OnEditorUpdate()
{
if (s_fi_GUISkin_current.GetValue(null) != null)
{
try
{
DoInstall();
}
finally
{
EditorApplication.update -= OnEditorUpdate;
}
}
}
#endif
#endregion