UnityLogViewer
In-game log viewer for Unity Games
模組介紹 作者原文
UnityLogViewer
An in-game log viewer overlay for any BepInEx 5 Unity game, designed to help with debugging while developing mods.
Features
- Real-time in-game log overlay showing Unity log output
- Draggable, resizable window
- Live text filter with regex support
- Auto-scroll to keep up with new log entries
- Pin mode to lock the window in place and hide decorations for an unobtrusive heads-up display
- Configurable syntax highlighting with 8 color-coded regex rules (errors, warnings, debug, etc.)
- Adjustable background opacity
Installation
r2modman
- Install Mod Manager or r2modman.
-or-
- Download the mod, and follow the Manual Installation instructions below.
Vortex
- Install via Vortex Mod Manager.
-or-
- Download the mod, and follow the Manual Installation instructions below.
Manual Installation
- Install BepInEx 5 for your game.
- Download the latest release of UnityLogViewer.
- Extract the UnityLogViewer.dll file into your BepInEx/plugins directory.
Usage
Press F7 (default) to toggle the log viewer window. The window displays the most recent log output (500 lines by default, configurable via BufferSize).
- Filter — Type in the filter bar to show only matching lines. Supports regular expressions; falls back to plain text search if the regex is invalid.
- ⌫ — Clears the current filter.
- Clear — Clears the current buffer.
- Auto-scroll — When enabled (default), the view automatically scrolls to the latest log entry. Toggle it off to freeze the view and scroll manually.
- Pin — Click the pin button in the title bar to lock the window in place. Pinned mode hides the title bar, filter bar, and resize handle, leaving only the log text over a transparent background. Click the unpin button in the top-right corner to restore the full window.
- Resize — Drag the handle in the bottom-right corner of the window to resize.
- Drag — Drag the title bar to reposition the window.
Configuration
The config file com.malafein.unitylogviewer.cfg is generated in your BepInEx/config folder after the first run. Settings can also be changed in-game via Configuration Manager.
General
| Setting | Default | Description |
|---|---|---|
| ShowWindow | false | Toggle the log viewer window on/off. Use this if the hotkey doesn't work with your game's input system. |
| ToggleShortcut | F7 | Keyboard shortcut to toggle the log viewer. |
| Filter | (empty) | Persistent filter string (supports regex). |
| FontName | (empty) | Font to use for log text. Leave empty for the default UI font. If valid OS fonts are detected at runtime, a selector appears in the log viewer window. Note: font selection has not yet been tested on all platforms. |
| BackgroundOpacity | 40 | Background opacity of the log window (0–100). |
| Pinned | false | Pin the log view in place, hiding window decorations and disabling interaction. |
| BufferSize | 500 | Maximum number of log lines to keep in the buffer (100–5000). |
Window
These values are saved and updated automatically whenever you move or resize the window, so your preferred layout is preserved between sessions.
| Setting | Default | Description |
|---|---|---|
| WindowX | 833 | Horizontal position of the window (pixels from left). |
| WindowY | 1019 | Vertical position of the window (pixels from top). |
| WindowWidth | 1507 | Width of the window in pixels. |
| WindowHeight | 300 | Height of the window in pixels. |
Highlighting
Eight configurable highlight slots let you color-code log lines by pattern. Each slot has a pattern and a color setting. The first matching rule wins.
| Setting | Default | Description |
|---|---|---|
| Highlight1Pattern | \[ERROR\] | Regex pattern for highlight rule 1. |
| Highlight1Color | red | Color for highlight rule 1. |
| Highlight2Pattern | \[WARNING\] | Regex pattern for highlight rule 2. |
| Highlight2Color | yellow | Color for highlight rule 2. |
| Highlight3Pattern | \[DEBUG\]\|\[DBG\] | Regex patt
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。