@@ -116,8 +116,8 @@ namespace MonoHook
|
||||
|
||||
static void SetupFlushICacheFunc()
|
||||
{
|
||||
string processorType = SystemInfo.processorType.ToLowerInvariant();
|
||||
if (processorType.Contains("intel") || processorType.Contains("amd"))
|
||||
string processorType = SystemInfo.processorType;
|
||||
if (processorType.Contains("Intel") || processorType.Contains("AMD"))
|
||||
return;
|
||||
|
||||
if (IntPtr.Size == 4)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e84139b42a6164e4c93ce4df1be6dcfb
|
||||
guid: 9c0482f5e3f6dbf4a82a4c1dc7988d5e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -16,11 +16,7 @@ namespace MonoHook
|
||||
|
||||
static HookUtils()
|
||||
{
|
||||
try
|
||||
{
|
||||
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
|
||||
}
|
||||
catch { }
|
||||
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
|
||||
|
||||
PropertyInfo p_SystemPageSize = typeof(Environment).GetProperty("SystemPageSize");
|
||||
if (p_SystemPageSize == null)
|
||||
@@ -39,16 +35,6 @@ namespace MonoHook
|
||||
|
||||
public static void MemCpy_Jit(void* pDst, byte[] src)
|
||||
{
|
||||
if (!jit_write_protect_supported)
|
||||
{
|
||||
fixed(void * pSrc = &src[0])
|
||||
{
|
||||
MemCpy(pDst, pSrc, src.Length);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
fixed(void * p = &src[0])
|
||||
{
|
||||
memcpy_jit(new IntPtr(pDst), new IntPtr(p), src.Length);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efda6e010e5c6594081c4a62861d469f
|
||||
guid: 8ab765aec3653f0449c2ba805a5966a6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d796fc01daee1964586621890988a5ae
|
||||
guid: 7cf7966d2f4139f42a5504fb12299dc4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.IO;
|
||||
|
||||
namespace HybridCLR.MonoHook
|
||||
{
|
||||
#if UNITY_2021_1_OR_NEWER && !UNITY_2023_1_OR_NEWER
|
||||
#if UNITY_2021_1_OR_NEWER
|
||||
[InitializeOnLoad]
|
||||
public class CopyStrippedAOTAssembliesHook
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf42c4f20b8a1b94baa04a1a5c6b8beb
|
||||
guid: aeea2b7e7523c9a4aa19be70f832bda2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.IO;
|
||||
|
||||
namespace HybridCLR.MonoHook
|
||||
{
|
||||
#if UNITY_2022 || UNITY_2023_1_OR_NEWER
|
||||
#if UNITY_2022
|
||||
[InitializeOnLoad]
|
||||
public class GetIl2CppFolderHook
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96c2bc28db69e1644892219abef3d4b5
|
||||
guid: 541e6130979493447825045c244c133c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.IO;
|
||||
|
||||
namespace HybridCLR.MonoHook
|
||||
{
|
||||
#if UNITY_2021_1_OR_NEWER && (UNITY_WEBGL || UNITY_WEIXINMINIGAME)
|
||||
#if UNITY_2021_1_OR_NEWER && UNITY_WEBGL
|
||||
[InitializeOnLoad]
|
||||
public class PatchScriptingAssembliesJsonHook
|
||||
{
|
||||
@@ -35,29 +35,12 @@ namespace HybridCLR.MonoHook
|
||||
|
||||
private static string BuildMainWindowTitle()
|
||||
{
|
||||
var cacheDir = $"{Application.dataPath}/../Library/PlayerDataCache";
|
||||
if (Directory.Exists(cacheDir))
|
||||
string tempJsonPath = $"{Application.dataPath}/../Library/PlayerDataCache/WebGL/Data/ScriptingAssemblies.json";
|
||||
if (File.Exists(tempJsonPath))
|
||||
{
|
||||
foreach (var tempJsonPath in Directory.GetDirectories(cacheDir, "*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
string dirName = Path.GetFileName(tempJsonPath);
|
||||
#if UNITY_WEIXINMINIGAME
|
||||
if (!dirName.Contains("WeixinMiniGame"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
if (!dirName.Contains("WebGL"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
var patcher = new PatchScriptingAssemblyList();
|
||||
patcher.PathScriptingAssembilesFile(tempJsonPath);
|
||||
}
|
||||
var patcher = new PatchScriptingAssemblyList();
|
||||
patcher.PathScriptingAssembilesFile(Path.GetDirectoryName(tempJsonPath));
|
||||
}
|
||||
|
||||
string newTitle = BuildMainWindowTitleProxy();
|
||||
return newTitle;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc89a9041ab48ac41975fbd1e00b9b98
|
||||
guid: ea52aac3bd5754841bff8c177a91a160
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c561c9729c367e4fbef63f4ec56f268
|
||||
guid: d5a77282b371549439907297e5f967d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd0b8071cf434d6498160259e3829980
|
||||
guid: 1d457aae59bb6a949b97887543318503
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16b9dc031f67b4fe5ad79c230f75768c
|
||||
guid: e0c9859301729b84f88491ed39122043
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56b28b5583a184c669dcb968d175544c
|
||||
guid: 0b61f42ce4a78754f949acd008581b29
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69eeb734e262a0a4fbe0887249198f73
|
||||
guid: a88be91a9edddd249b1c076491e8cb11
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7adba4475cf0bdc4fa7995c0d748f480
|
||||
guid: 76fbfe977abb84741b86eb67907b15e5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e092a73910a69894daea44290d7292f6
|
||||
guid: cb117b25721641c45bf5ec77a09438f5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31f6a810e38e66f4c832b135770a04bb
|
||||
guid: 25a82d6fb527b6249b44af1fb31d6cdc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4adb23596911347faa69537b900c9f5e
|
||||
guid: ca79f0e18c71509439472ab7a43208b3
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Reference in New Issue
Block a user