A BepInEx (IL2CPP) mod that adds two configurable hotkeys to toggle targeting behavior in real time, with a HUD indicator in the bottom-right corner that only appears during a run.
| Dependency | Version |
|---|---|
| BepInEx IL2CPP Pack | 6.0.738+ |
| .NET SDK (to compile) | 6.0+ |
| Megabonk | latest |
.dll.TargetToggleMod.dll in BepInEx/plugins/.| Key | Action |
|---|---|
T |
Toggle between Closest Enemy and Smart Aim |
Y |
Toggle Boss Focus mode |
Edit the generated config file at:
BepInEx/config/com.tuusuario.targettoggle.cfg
[Hotkeys]
ToggleTargetingMode = T
ToggleBossFocus = Y
Any Unity KeyCode value is valid — see the full list at:
https://docs.unity3d.com/ScriptReference/KeyCode.html
TARGET: Closest / TARGET: Smart AimTARGET: Closest | BOSS when Boss Focus is activeThis mod uses a Harmony patch on EnemyTargeting.GetTargetedEnemy() to intercept targeting in real time — no save file modification needed.
GetClosestEnemy(), skipping the default logicEEnemyFlag.AnyBoss and targets the closest one. If no boss is found, falls back to the active targeting modeTargetToggleMod/
├── TargetTogglePlugin.cs — main plugin (hotkeys, HUD, Harmony patch)
├── MyPluginInfo.cs — GUID, name, version
├── TargetToggleMod.csproj — C# project with BepInEx references
├── manifest.json — Thunderstore package manifest
├── icon.png — 256x256 mod icon
└── README.md — this file
MIT — do whatever you want with the code.