https://github.com/noodle-eater/instant-game-debugger
An Instant, Simple & Ready to use Unity In-Game Debugger & Console.
https://github.com/noodle-eater/instant-game-debugger
debugger-canvas game-debugger game-tool game-tools gamedev unity
Last synced: 20 days ago
JSON representation
An Instant, Simple & Ready to use Unity In-Game Debugger & Console.
- Host: GitHub
- URL: https://github.com/noodle-eater/instant-game-debugger
- Owner: noodle-eater
- Created: 2020-06-08T08:18:22.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2020-06-14T06:22:31.000Z (over 5 years ago)
- Last Synced: 2025-06-03T19:17:53.518Z (4 months ago)
- Topics: debugger-canvas, game-debugger, game-tool, game-tools, gamedev, unity
- Language: C#
- Size: 113 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Instant Game Debugger
An Instant, Simple & Ready to use Unity In-Game Debugger & Console. We already have some in-game console in unity asset store. But sometimes I find bug that I do not have a time to fix it. And I found my self repeating stacking a UI in Unity to test thirdparty features, like the one in [Ads Framework](https://github.com/AmdHamdani/Ads-Framework). So this debugger is the extension version of the UI I stacked in the [Ads Framework](https://github.com/AmdHamdani/Ads-Framework). Beside it, I just want to see the log from my game, so if the in-game console I get from asset store not working, I do not want to spend my time fixing it. So I decide to make this fun little thing. And the main reason is of course because I love doing this. By the way, Thank you for :) take a look or try this tiny debugger. Feel free to reach me or create an issue if you have any suggestion, feedback or report.## A. Example
### 1. Code
```c#
using UnityEngine;public class DebugExample : MonoBehaviour
{
private int counter = 0;
private string[] foods = new string[] { "Apple", "Orange", "Noodle"};
private void Start() {
var debug = new GameDebugger();debug.Init();
debug.AddText("In Game Debugger");
debug.AddText(() => "Counter : " + counter);
debug.AddButton("Add", () => { counter++; Debug.Log("Counter " + counter); });
debug.AddDropDown(foods, (index) => Debug.Log("I want to eat " + foods[index]));
debug.AddConsole();
}
}
```### 2. Result

## B. Documentation
### 1. Init
Initialize the Debugger Canvas and all required config. Make sure to call this first before add any UI.
```c#
public void Init()
```### 2. Button
Add a button into the debugger canvas.
```c#
public void AddButton(string buttonName, System.Action OnClicked)
```### 3. Text
Add a text into the debugger canvas. You can use this, if you want to inspect a value. The text will be updated each frame.
```c#
public void AddText(System.Func GetText)
```### 4. Static Text
Add a text into the debugger canvas. This text will not be updated, so if you want to inspect a value do not use this one.
```c#
public void AddText(string text)
```### 5. Separator
Add black straight line to separate UI.
```c#
public void AddSeparator()
```### 6. Dropdown
Add a dropdown choice in debug UI.
```c#
public void AddDropDown(string[] options, System.Action OnOptionSelected)
```### 7. Console
Add small console window in debugger.
```c#
public void AddConsole()
```### 8. Additional
All the debugger UI & console here I usually used for testing thirdparty features in Android in potrait mode. So, all available UI here is fit in potrait mode. You can change it from the prefab directly, e.g if you want to use it in landscape mode, just open the `Debug Canvas` prefabs. Change the `Reference Resolution` in `Canvas Scaller`.
## C. Next Features
- [x] Drop Down
- [ ] Show Console on Error
- [ ] Debugger Config
- [ ] Potrait & Landscape UI Mode
- [x] Copy log to clipboard