mirror of
https://gitea.tendokyu.moe/TeamTofuShop/segatools.git
synced 2026-09-22 22:37:59 +03:00
User can debug their Unity game with dnspy and other debugger, it needn't patch mono.dll. most code is copied&modified from [UnityDoorstop](https://github.com/NeighTools/UnityDoorstop/blob/master/src/bootstrap.c#L328) currently it work on SDEZ/SDDT <details> <summary>How to debug and breakpoint Unity game (For example SDDT)</summary> 1. Modify segatools.ini and set `enableDebug` and `debugAddress`  2. Inject mu3 with hook dll  3. dnspy connect unity  4. open Modules tab and double click Assembly-CSharp.dll, yeah, now you can add breakpoints now.  </details> and make unity_config.target_assembly is optional if we just want to debug unity. Now PR is ready to code review and merge into upstream. Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/99 Co-authored-by: MikiraSora <mikirasora0409@126.com> Co-committed-by: MikiraSora <mikirasora0409@126.com>
16 lines
299 B
C
16 lines
299 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <windows.h>
|
|
|
|
struct unity_config {
|
|
bool enable;
|
|
bool debug_enable;
|
|
bool debug_suspend;
|
|
wchar_t target_assembly[MAX_PATH];
|
|
wchar_t debug_address[MAX_PATH];
|
|
};
|
|
|
|
void unity_config_load(struct unity_config *cfg, const wchar_t *filename);
|