extDebug are tools for easy development and testing of games on Unity. Supported platforms are PC, Mac and Linux / iOS / tvOS / Android / Universal Windows Platform (UWP) and other.
- Debug Menu
Allows you to add a debug menu in game, with many different functions. - Debug Notifications
Allows you to show a debug notification in game. - Analytics Heatmaps (Work in progress)
TODO: Description
And also:
- TODO
And much more
Old school
Just copy the Assets/extDebug folder into your Assets directory within your Unity project, or download latest extDebug.unitypackage.
OpenUPM
Via openupm-cli:
openupm add com.iam1337.extdebug
Or if you don't have it, add the scoped registry to manifest.json with the desired dependency semantic version:
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": [
"com.iam1337.extdebug",
]
}
],
"dependencies": {
"com.iam1337.extdebug": "1.15.0"
}
Package Manager
Project supports Unity Package Manager. To install the project as a Git package do the following:
- In Unity, open Window > Package Manager.
- Press the + button, choose "Add package from git URL..."
- Enter "https://github.com/iam1337/extDebug.git#upm" and press Add.
It is easy to use, lightweight library initially forked from hww/varp_debug_menu but deeply modifyed. The library allows you to add a debug menu in game, with many different functions.
- Changing values: numeric values, booleans, strings, enums, flags and other
- Store and restore default values
- Invoke actions
- Dynamic generation
Values
string _string;
byte _uint8;
UInt16 _uint16; // ushort
UInt32 _uint32; // uint
UInt64 _uint64; // ulong
sbyte _int8;
Int16 _int16; // short
Int32 _int32; // int
Int64 _int64; // long
float _float;
bool _bool;
Vector2 _vector2;
Vector3 _vector3;
Vector4 _vector4;
Quaternion _quaternion;
Color _color;
Vector2Int _vector2Int;
Vector3Int _vector3Int;
DM.Add("Values/String", () => _string);
DM.Add("Values/UInt8", () => _uint8, v => _uint8 = v);
DM.Add("Values/UInt16", () => _uint16, v => _uint16 = v);
DM.Add("Values/UInt32", () => _uint32, v => _uint32 = v);
DM.Add("Values/UInt64", () => _uint64, v => _uint64 = v);
DM.Add("Values/Int8", () => _int8, v => _int8 = v);
DM.Add("Values/Int16", () => _int16, v => _int16 = v);
DM.Add("Values/Int32", () => _int32, v => _int32 = v);
DM.Add("Values/Int64", () => _int64, v => _int64 = v);
DM.Add("Values/Float", () => _float, v => _float = v);
DM.Add("Values/Bool", () => _bool, v => _bool = v);
DM.Add("Values/Vector 2", () => _vector2, v => _vector2 = v, order: 14).SetPrecision(2);
DM.Add("Values/Vector 3", () => _vector3, v => _vector3 = v, order: 15).SetPrecision(2);
DM.Add("Values/Vector 4", () => _vector4, v => _vector4 = v, order: 16).SetPrecision(2);
DM.Add("Values/Quaternion", () => _quaternion, v => _quaternion = v, order: 17).SetPrecision(2);
DM.Add("Values/Color", () => _color, v => _color = v, order: 18).SetPrecision(2);
DM.Add("Values/Vector 2 Int", () => _vector2Int, v => _vector2Int = v, order: 19);
DM.Add("Values/Vector 3 Int", () => _vector3Int, v => _vector3Int = v, order: 20);
Enums and Flags
enum ExampleEnums
{
One,
Two,
Three
}
ExampleEnums _enum;
[Flags]
enum ExampleFlags
{
One = 1 << 0,
Two = 1 << 1,
Three = 1 << 2,
}
ExampleFlags _flags;
DM.Add("Values/Enum", () => _enum, v => _enum = v);
DM.Add("Values/Flags", () => _flags, v => _flags = v);
Actions
DM.Add("Debug/Action", action => Debug.Log("Hello World"));
DM.Add("Debug/Action 2", action => Debug.Log("Hello World"), "Action description"); // Action with description
Branches
DM.Add("Example/Branch 1");
DM.Add("Example/Branch 2", "Branch description");
// Another way to add menu item in specific branch
var branch = DM.Add("Example/Branch 3");
DM.Add(branch, "Action", action => Debug.Log("Hello World"));
Variants
string _string = "Variant 2";
string[] _stringVariants = new string[] { "Variant 1", "Variant 2", "Variant 3" };
// You can pre-define lists of values and select the ones you need from them.
DM.Add("Simple Menus/String Variants", () => _string, v => _string = v, _stringVariants, order: 1);
Shared
Q
- Show or hide menu without closing it
When the menu is open:
W
,S
- Moving through the menuA
,D
- Change value, invoke action, open/close branchR
- Reset value to defaultE
- Close current branch branch
When the menu is closed:
Shift+A
,Shift+D
- Change value, invoke action if menu is closedShift+R
- Reset value to default even if menu is closed
To change the default keyboard shortcuts, you need to create a class inherited from the IDMInput interface, and set its instance to DM.Input
.
To change the default IMGUI render, you need to create a class inherited from the IDMRender interface, and set its instance to DM.Render
.
It is easy to use, in-game notification system. Based on Garry's Mod notification system.
Simple notification
// Show notification for five seconds
DN.Notify("Simple notification", 5f);
Context notification
Calling a method with the same context allows you to declare infinite notifications. Also, the last call to the method with the new parameters and the same context will overwrite the parameters of the previous notification.
// Create simple context
object _context = new object();
// Show infinity notification
DN.Notify(_context, "Infinity notification", -1f);
// Hide infinity notification
DN.Kill(_context);
To change the default IMGUI render, you need to create a class inherited from the IDNRender interface, and set its instance to DN.Render
.
List of useful repositories to help make extDebug easier to use:
- extDebug.UGUI - Extension to support Unity UI and TextMeshPro in extDebug
> telegram.me/iam1337
> ext@iron-wall.org
This project is under the MIT License.