Skip to content

Commit

Permalink
Mac std attach Module V1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKnauth committed Nov 7, 2023
1 parent c05991f commit e992f29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game_engine/unity/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))?;
Expand Down Expand Up @@ -933,6 +935,9 @@ fn detect_version(process: &Process) -> Option<Version> {
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),
Expand Down

0 comments on commit e992f29

Please sign in to comment.