From e992f29d6569a075470f20ed00b51f2404967efa Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Mon, 6 Nov 2023 11:37:26 -0500 Subject: [PATCH] Mac std attach Module V1 --- src/game_engine/unity/mono.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game_engine/unity/mono.rs b/src/game_engine/unity/mono.rs index 351b857..4a765ae 100644 --- a/src/game_engine/unity/mono.rs +++ b/src/game_engine/unity/mono.rs @@ -54,6 +54,8 @@ impl Module { ("mono.dll", BinaryFormat::PE), ("mono-2.0-bdwgc.dll", BinaryFormat::PE), #[cfg(feature = "std")] + ("libmono.0.dylib", BinaryFormat::MachO), + #[cfg(feature = "std")] ("libmonobdwgc-2.0.dylib", BinaryFormat::MachO) ].into_iter() .find_map(|(name, format)| Some((name, process.get_module_range(name).ok()?, format)))?; @@ -933,6 +935,9 @@ fn detect_version(process: &Process) -> Option { if process.get_module_address("mono.dll").is_ok() { return Some(Version::V1); } + if process.get_module_address("libmono.0.dylib").is_ok() { + return Some(Version::V1); + } let unity_module = [ ("UnityPlayer.dll", BinaryFormat::PE),