Maple.MonoGameAssistant.UnityCore
1.0.1-rc
dotnet add package Maple.MonoGameAssistant.UnityCore --version 1.0.1-rc
NuGet\Install-Package Maple.MonoGameAssistant.UnityCore -Version 1.0.1-rc
<PackageReference Include="Maple.MonoGameAssistant.UnityCore" Version="1.0.1-rc" />
paket add Maple.MonoGameAssistant.UnityCore --version 1.0.1-rc
#r "nuget: Maple.MonoGameAssistant.UnityCore, 1.0.1-rc"
// Install Maple.MonoGameAssistant.UnityCore as a Cake Addin #addin nuget:?package=Maple.MonoGameAssistant.UnityCore&version=1.0.1-rc&prerelease // Install Maple.MonoGameAssistant.UnityCore as a Cake Tool #tool nuget:?package=Maple.MonoGameAssistant.UnityCore&version=1.0.1-rc&prerelease
Maple.MonoGameAssistant
项目说明
描述
- dotNet9 + AOT + Blazor 写了一个 Unity Game 通用修改器框架
- x86
- x86_64
要求
- 一个VS2022
- 一个DotNet9(rc1) SDK 需要安装AOT
- Unity编译的X64游戏(MONO&IL2CPP) Demo
参考
NuGet
项目参考
项目描述 | projectName | desc | status | |------------------------------------------------------------|----------------------------------------------------------------|------------|
| Maple.MonoGameAssistant.Common | 常用帮助类 | ✔ | | Maple.MonoGameAssistant.Logger | 简单的日志实现 | ✔ | | Maple.MonoGameAssistant.MonoCollector | MONOAPI&源生成器所需的公用代码1 | ✔ | | Maple.MonoGameAssistant.MonoCollectorDataV2 | MONOAPI&源生成器所需的公用代码2 | ✔ | | Maple.MonoGameAssistant.MonoCollectorGeneratorV2 | 源生成器-对MONOAPI生产类似元数据转成C#代码 | ✔ | | Maple.MonoGameAssistant.Core | 利用MONOAPI收集类似元数据的项目 参考了CheatEngine中的实现 | ✔ | | Maple.MonoGameAssistant.Model | 元数据模型 | ✔ | | Maple.MonoGameAssistant.UnityCore | 对Unity常用类 | ✔ | | Maple.MonoGameAssistant.GameCore | GameWebApi项目通信的Http | ✔ | | Maple.MonoGameAssistant.GameDTO | GameWebApi传输模型 | ✔ | | Maple.MonoGameAssistant.GameShared | BlazorUI项目共享 用了MASA的UI | ✔ | | Maple.MonoGameAssistant.GameSSR | SSR调试用 | ✔ | | Maple.MonoGameAssistant.GameWASM | WASM发布用 调试卡成🐕 | ✔ | | Maple.MonoGameAssistant.WebApi | MONOAPI的服务端采用了管道通信(基于HTTP)(参考CE)& GameCheat服务端实现 | ✔ | | Maple.MonoGameAssistant.GameContext | Windows-游戏修改器继承基类 | ✔ | | Maple.MonoGameAssistant.HookTask | Windows-HOOK WIN MSG 在主线程上执行自定义代码 | ✔ | | Maple.MonoGameAssistant.HotKey | Windows-HOOK WIN MSG 按键通知 | ✔ | | Maple.MonoGameAssistant.HotKey.Abstractions | 消息按键通知接口 | ✔ | | Maple.MonoGameAssistant.UITask | Windows-WIN TIMER 在主线程上执行自定义代码 | ✔ | | Maple.MonoGameAssistant.WinApi | Windows-WIN32API | ✔ | | Maple.MonoGameAssistant.DllProxyStaticLib | Windows-DllProxy C++的静态库 可以让C# AOT 链接 | ✔ |备注
- MonoTask 实现一个TaskScheduler (注意:调用MONOAPI的都需要附加到MONO这个操作) 让函数利用Task调度到一个指定的线程 附加并执行代码后退出附加
- HookTask 基于HOOK WIN MSG 调度到主线程上执行自定义函数
- UITask 基于WIN32API SetTimer 调度到主线程上执行自定义函数
劫持代替项目
<ItemGroup>
<NativeLibrary Include="Lib\Maple.MonoGameAssistant.DllProxyStaticLib.lib" />
</ItemGroup>
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvStdcall),typeof(CallConvSuppressGCTransition)], EntryPoint = nameof(DllMain))]
[return: MarshalAs(UnmanagedType.Bool)]
public static bool DllMain(nint hModule, uint ul_reason_for_call, nint lpReserved)
{
return InitDllMain(hModule, ul_reason_for_call, lpReserved);
}
[UnmanagedCallConv(CallConvs = [typeof(CallConvStdcall), typeof(CallConvSuppressGCTransition)])]
[LibraryImport("*")]
[return: MarshalAs(UnmanagedType.Bool)]
public static partial bool InitDllMain(nint hModule, uint ul_reason_for_call, nint lpReserved);
- 常用API
| Class | desc | code |
| ------------------------------- | ---------------------------------------------------------------------------------------------- | ---- |
| MonoCollectorMethodAttribute | 对MONOAPI 提供的元数据查找函数地址 支持自定义查找规则 |
[MonoCollectorMethod(Name_Func_ENCODE_TO_JPG, Search = typeof(Search_ImageConversion))]
| | MonoCollectorPropertyAttribute | 对MONOAPI 提供的元数据查找class 成员字段 默认按 字段名字查询 以兼容游戏版本 |[MonoCollectorProperty(PropertyName = "Price")]
| | MonoCollectorStaticPropertyAttribute | 对MONOAPI 提供的元数据查找class 静态字段 默认按 字段名字查询 以兼容游戏版本 |[MonoCollectorStaticProperty(PropertyName = "Instance")]
|
项目更新说明
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
-
net9.0
- Maple.MonoGameAssistant.Common (>= 1.0.0-rc)
- Maple.MonoGameAssistant.Core (>= 1.0.1-rc)
- Maple.MonoGameAssistant.Model (>= 1.0.0-rc)
- Maple.MonoGameAssistant.MonoCollector (>= 1.0.0-rc)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0-rc.1.24431.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0-rc.1.24431.7)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0-rc.1.24431.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Maple.MonoGameAssistant.UnityCore:
Package | Downloads |
---|---|
Maple.MonoGameAssistant.GameContext
Maple.MonoGameAssistant.GameContext |
GitHub repositories
This package is not used by any popular GitHub repositories.