Skip to content

Latest commit

Β 

History

138 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevSuite for Unity

Unity openupm License GitHub stars

DevSuite is a lightweight and powerful in-game and Editor debug console and troubleshooting suite for Unity. It provides a flexible and extensible framework for managing debug commands, monitoring performance, viewing logs in an in-game console, browsing scene hierarchy, and inspecting GameObjects and components directly within your application or the Unity Editor.

Why DevSuite?

DevSuite serves as a modern, 100% free, and open-source alternative to popular Unity debug assets such as SRDebugger, Lunar Mobile Console, In-game Debug Console, UnityRuntimeInspector and others. By consolidating essential debugging features - including an in-game logs console, runtime hierarchy browser, GameObject inspector, performance monitor, and attribute-driven command system - into one lightweight and powerful package, DevSuite eliminates the need for fragmented, paid toolsets and provides a cohesive experience for efficient runtime troubleshooting.

Feature Comparison

Feature DevSuite SRDebugger In-Game Debug Console Lunar Mobile Console
License / Price Free (MIT) Paid ($50) Free (MIT) Free / $30 Pro
UI Technology UI Toolkit (Modern & scalable) uGUI IMGUI Native UI / uGUI
In-Game Logs & Stacktraces βœ… βœ… βœ… βœ…
Interactive Terminal CLI βœ… (Autocomplete, ghost hints, history) ❌ βœ… (Basic) ❌
Runtime Hierarchy & Inspector βœ… βœ… ❌ ❌
Attribute-Driven Commands βœ… (Extensive customization: colors, visibility, formats, adapters) βœ… (Basic options) βœ… (Basic) βœ… (Basic)
Auto-Parameterized Command Inputs βœ… (Sliders, dropdowns, inputs) ❌ ❌ ❌
Performance Monitor & Graphs βœ… (FPS, memory, batches, custom graphs) βœ… (Basic stats) ❌ βœ… (FPS & memory)
Pinned Commands Panel βœ… βœ… ❌ ❌
Standalone Editor Windows βœ… (Identical UI in Editor & Game) βœ… (Commands only) ❌ ❌
Platform Support Desktop, Mobile, WebGL, Editor Desktop, Mobile Desktop, Mobile, WebGL Mobile (iOS / Android)

Screenshots

🎬 Showcase πŸ–₯️ Landscape πŸ“± Portrait βš™οΈ Editor Windows
Showcase Landscape Portrait Editor Windows

πŸŽ›οΈ Control Bar πŸ› οΈ Commands πŸ“Œ Pinned Commands 🌳 Hierarchy πŸ” Inspector πŸ“œ Logs πŸ“Š Performance
Control Bar Commands Pinned Hierarchy Inspector Logs Performance

Features

  • ⚑ Simple but Powerful: A robust all-in-one debug toolkit that is easy to set up.
  • πŸͺΆ Lightweight: Minimum code and assets, optimized runtime, no dependencies, available via Unity Package Manager (UPM).
  • πŸ†“ Free & Open-Source: 100% free and open-source, released under the MIT License for use in personal and commercial projects.
  • 🧩 Flexible Integration: Easy to set up and integrate into existing projects with minimal overhead.
  • 🌐 Cross-Platform: Supports running in the Editor, as well as Desktop, Mobile, and WebGL builds.
  • πŸ“± Responsive Design: Modern UI Toolkit-based interface that works seamlessly across different screen sizes.
  • 🏷️ Commands with Extensive Attributes: Highly customizable through attributes, allowing you to expose debug commands and data with minimal code.
  • βš™οΈ Auto-Parameterized Command Buttons: Methods with parameters annotated with [CommandButton] automatically generate inline editable inputs (fields, sliders, dropdowns) for their arguments without boilerplate.
  • πŸ’» In-Game CLI (Command Line Interface): Integrated terminal at the bottom of the Logs console (`Ctrl+`` shortcut) with autocompletion, real-time ghost parameter placeholders, persistent command history (Up/Down arrows), and execution.
  • πŸ“Š Performance Monitor: Integrated graphs and statistics for real-time performance tracking (FPS, memory, etc.), can add your own custom stats too.
  • πŸ“œ Logs Panel: Full-featured in-game console for viewing and filtering logs, copying call stacks, and saving logs to a file.
  • πŸ“Œ Pinned Commands: A dedicated panel for your most frequently used debug actions for quick access.
  • 🌳 Hierarchy Panel: Browse the live scene hierarchy at runtime - search, filter, select, toggle active state, and copy the full tree as text.
  • πŸ” Inspector Panel: Inspect selected GameObjects at runtime - view all components, toggle MonoBehaviour enabled state, and copy all property values to clipboard.
  • πŸ”„ Data Handling: Support for custom data adapters and providers.
  • πŸš€ Fast Play Mode Ready: Optimized for Unity's fast play mode to minimize iteration times.
  • ✨ Quality of Life:
    • πŸ—‚οΈ Organization: Advanced filtering, pinning system, and category tabs.
    • πŸ’Ύ Persistent Properties: Integrated SavedPrefsProperty<T> for properties that automatically save and load their values from preferences with change tracking.
    • ⏱️ Efficiency: Button shortcuts and a predefined set of common utility commands.
    • 🎨 Customization: Customizable colors, titles, tooltips, item height, scale type for sliders, values providers for dropdown lists, and more.
    • πŸ”Œ Dynamic Registration: Register and unregister commands at runtime for both static classes and specific class instances.
    • 🀝 Unified Experience: Identical look and feel between Editor Windows and Runtime UI.

Requirements

  • Minimum Tested Unity Version: 2022.3.62
  • Dependencies: UI Toolkit (Standard in Unity 2022.3+)
  • Serialization (Recommended): It is strongly recommended to have one of the following packages installed for optimal functionality:

Installation

Via OpenUPM

The package is available on the openupm registry. It can be installed via openupm-cli:

openupm add com.ff.devsuite

Via Git URL (UPM)

  1. Open the Package Manager in Unity (Window > Package Manager).
  2. Click the + button in the top-left corner and select Add package from git URL....
  3. Enter the repository URL:
    https://github.com/fairfun/devsuite-for-unity.git?path=DevSuite/Assets/DevSuite
    
    To pin a specific version, append the tag (e.g. #0.5.0):
    https://github.com/fairfun/devsuite-for-unity.git?path=DevSuite/Assets/DevSuite#0.5.0
    

Getting Started

There are several ways to use DevSuite depending on your needs:

1. Runtime UI (Simplest)

Add an instance of DevSuitePanel.prefab to your scene. This automatically initializes the suite and provides an overlay to access all tools during gameplay, as long as Auto Initialize is set to true. Some panel settings are available under the Settings section of the prefab instance.

Open the example scene DevSuite/Assets/DevSuite/Examples/ExampleAutoInitialization.unity to see this setup in action (needs to be copied into the Assets folder to be opened if imported as a package).

2. Editor Windows

You can open individual DevSuite tools directly in the Unity Editor without entering Play Mode:

  • Go to Tools > DevSuite and select the desired panel (Commands, Logs, Performance, or Pins).

3. Manual Code Initialization

For more control, you can initialize the DevSuiteContext manually in your code:

using Ff.DevSuite;
using UnityEngine;

public class MyGameInitializer : MonoBehaviour
{
    void Awake()
    {
        // Initialize with this MonoBehaviour as the coroutine runner
        DevSuiteContext.Default.Initialize(this);
    }
}

Note

Make sure to disable Auto Initialize on the DevSuitePanelUI component in the Inspector.

Open the example scene DevSuite/Assets/DevSuite/Examples/ExampleManualInitialization.unity to see this setup in action (needs to be copied into the Assets folder to be opened if imported as a package).

4. Asteroids Sample Game

Import the Asteroids Game sample via Unity Package Manager (Window > Package Manager > DevSuite for Unity > Samples > Import), or open the scene at DevSuite/Assets/DevSuite/Samples~/Asteroids/Asteroids.unity to play a classic Asteroids game equipped with live DevSuite commands, tunable parameters, and runtime hierarchy inspection.

5. Disabling DevSuite

  • Compile-time: Define the scripting symbol DEVSUITE_DISABLED (e.g. in Player Settings > Other Settings > Scripting Define Symbols) to completely disable DevSuite.
  • Runtime: Set DevSuiteContext.Enabled = false before DevSuitePanelUI.Awake (execution order -99).

Refer to the documentation or sample scenes for more detailed configuration and advanced usage.

Usage

πŸ“‹ Setup

πŸš€ Initialization πŸ’Ύ Serialization Options βš™οΈ Modifying CommonCommands

Automatic (prefab)

Add DevSuitePanel.prefab to a scene. DevSuitePanelUI calls DevSuiteContext.Default.Initialize(this) on Start when Auto Initialize is enabled.

See example scene: ExampleAutoInitialization.unity (needs to be copied into the Assets folder to be opened if imported as a package)

Manual

Call DevSuiteContext.Default.Initialize(monoBehaviour) from your bootstrap code (e.g. Awake). Note: disable Auto Initialize on DevSuitePanelUI in this case. Optional arguments:

  • staticCommandsAssemblies - limit command scanning to specific assemblies
  • savedPrefs - custom ISavedPrefs for panel/settings persistence
  • registerCommonCommands: false - skip built-in CommonCommands
  • DevSuiteContext.Default.BuildVersionToDisplay - override the version string shown in the UI (default: "v" + Application.version with bundle number if available) - see DevSuiteContext.cs

See example scene: ExampleManualInitialization.unity (needs to be copied into the Assets folder to be opened if imported as a package)

Editor

Open panels via Tools > DevSuite; the context initializes automatically when you enter Play Mode.

Runtime registration

After init, use AttributesParser.RegisterStatic(type) or AttributesParser.RegisterInstance(object) to add commands dynamically.

DevSuite uses SavedPrefs for persistent settings (SavedPrefsProperty<T>, panel state). The serializer is selected automatically based on installed packages (via DevSuite.asmdef versionDefines):

If multiple packages are present, MemoryPack takes priority, then MessagePack, then Newtonsoft.

If needed, override the backend: SavedPrefs.Factory = name => new MemoryPackSavedPrefs(name);

Custom serialization: savedPrefs.SetSerializer(serialize, deserialize)

No serializer package: Falls back to FallbackSavedPrefs (in-memory only; settings are not persisted).

CommonCommands is a built-in static command set (Game, Data, System, Dev Suite categories) registered automatically unless registerCommonCommands: false is passed to Initialize().

Customize without editing source

  • CommonCommands.ModifySystemInfo - transform the System Info text block
  • CommonCommands.CustomSystemInfoBuildTimeData - append custom build-time lines

Extend or replace

Add your own [CommandCategory] classes, or fork/edit CommonCommands.cs directly. Many entries use SavedPrefsProperty<T> so values persist across sessions.

πŸ› οΈ Customization

🏷️ Command Attributes πŸ”Œ Registering Adapters & Providers πŸ“Š Performance Graphs

Commands are declared with attributes on static or instance members and discovered at initialization.

Hierarchy

[CommandCategory] β†’ [CommandGroup] β†’ [Command] β†’ [CommandValue] / [CommandButton]

Common attributes

  • [CommandCategory] / [CommandGroup] - organization, colors, descriptions, collapse state, visibility functions
  • [Command] - DisplayName, HeightMultiplier, AlwaysPin, VisibilityFunctionName
  • [CommandValue] - fields, properties, methods; supports MinValue/MaxValue, ScaleType, ReadOnly, PossibleValuesFunctionName, ForceStringRepresentation, Format, Flex, Color, FontResource
  • [CommandButton] - action buttons; supports Title, Shortcut, CommandId to attach to an existing command row

See BaseCommandAttribute subclasses for the full set of properties.

Extend how command values are displayed, edited, and populated.

Adapters - convert between custom types and their UI string representation:

CommandsApi.RegisterAdapter(new DelegateCommandValueAdapterToString<MyType>(toString, fromString));

Values providers - supply dropdown lists for a type:

CommandsApi.RegisterValuesProvider(new CommandValuesProvider(typeof(MyType), _ => myValues));

Functions providers - expose static/instance methods (e.g. for VisibilityFunctionName) from external types:

CommandsApi.RegisterTargetForFunctionsProvider(new CommandFunctionsSourceProvider(typeof(MyClass)));

Default adapters and an enum values provider are registered automatically during initialization.

Built-in graphs: Frame Time, CPU Frame Time, GPU Frame Time, Render Thread Time, FPS, GC Memory, System RAM, Draw Calls, Batches, Triangles (registered in DevSuiteContext.Initialize).

Add a custom graph

  1. Subclass BaseGraphDataProvider
  2. Implement GetCurrentValue(), Label, and UnitName
  3. Use SetPerformanceGraphSettings to modify thresholds, change default expanded state, or hide/disable graphs
  4. Call RegisterPerformanceGraph(new MyGraphDataProvider())

Configure settings for performance graphs

Use SetPerformanceGraphSettings<T>(new GraphDataProviderSettings(referenceValueProvider: () => threshold, expandedByDefault: true, register: true)) where T is the provider type (e.g. SystemRamGraphDataProvider, DrawCallsCountDataProvider).

Built-in CommonCommands exposes Target RAM and Target Draw Calls sliders that update these at runtime.

Frame Time reference defaults to the target FPS budget (1 / TargetFps * 1000 ms).

Examples

Defining Commands

Defining Commands

Commands use a declarative attribute system. Decorate static members with attributes and they are discovered automatically at initialization.

1. Simple Button

A single button that logs a message:

using Ff.DevSuite.Commands.Attributes;
using UnityEngine;

namespace Ff.DevSuite
{
    [CommandCategory("My Tools")]
    public static class MyCommands
    {
        [CommandGroup("Actions")]
        [CommandButton(Title = "Hello")]
        private static void SayHello() => Debug.Log("Hello from DevSuite!");
    }
}

2. Read-Only Value With Action Buttons

Displays the persistent data path with "Clear" and "Open" buttons attached to the same command row:

using Ff.DevSuite.Commands.Attributes;
using System.IO;
using UnityEngine;

namespace Ff.DevSuite
{
    [CommandCategory("My Tools")]
    public static class MyCommands
    {
        public const string GroupData = "Data";

        // Read-only value (auto-creates a Command)
        [CommandGroup(GroupData), CommandValue(nameof(PersistentPath))]
        private static string PersistentPath => Application.persistentDataPath;

        // Buttons linked to the same command by nameof()
        [CommandGroup(GroupData), CommandButton(nameof(PersistentPath), Title = "Clear")]
        private static void PersistentPath_Clear() => Directory.Delete(PersistentPath, true);

        [CommandGroup(GroupData), CommandButton(nameof(PersistentPath), Title = "Open")]
        private static void PersistentPath_Open() => Application.OpenURL($"file://{PersistentPath}");
    }
}

3. Auto-Parameterized Command Buttons

Methods with parameters decorated with [CommandButton] automatically generate matching editable input fields (or dropdowns for enums and types with values providers) right beside the execute button. When clicked, the method is invoked with the current parameter values:

using System;
using Ff.DevSuite.Commands.Attributes;
using UnityEngine;

namespace Ff.DevSuite
{
    [CommandCategory("Player")]
    public static class PlayerCommands
    {
        // Automatically creates editable input fields for each parameter!
        [CommandButton(Title = "Give Items")]
        private static void GiveItems(string itemId = "gold_coin", int count = 100, bool notifyUser = true)
        {
            Debug.Log($"Gave {count}x {itemId} (notify: {notifyUser})");
        }

        // Enums automatically become dropdowns
        [CommandButton(Title = "Set Schedule")]
        private static void SetSchedule(DayOfWeek day = DayOfWeek.Monday, float? durationHours = 2.5f)
        {
            Debug.Log($"Scheduled for {day}, duration: {durationHours}h");
        }
    }
}

4. In-Game CLI (Command Line Interface)

DevSuite includes a terminal CLI at the bottom of the Logs Panel. Press Ctrl+` to open DevSuite, expand the Logs panel, and focus the CLI input field immediately.

  • Auto-Completion Suggestions: As you type, matching commands are displayed in category/group/commandId/cliCommand hierarchy format. Clicking any suggestion pastes it into the input field.
  • Ghost Parameter Placeholders: Shows parameter types, names, and defaults in real time in a dimmed font behind your cursor. As you type values, matching placeholders disappear.
  • Command History: Cycle through the last 20 executed commands using the Up Arrow and Down Arrow keys.
  • Custom CLI Command Name: By default, buttons use their sanitized title/method name as the CLI command. You can set a custom command using [CommandButton(CliCommand = "my_cmd")].
  • Toggle CLI Availability: By default, CliEnabled is true. To exclude specific buttons from the CLI while keeping them in the UI, set [CommandButton(CliEnabled = false)].
  • Built-in CLI Commands:
    • Type help (or click Show Cli Commands under the Dev Suite group) to print all available commands, parameter types/defaults, and descriptions to the console.
    • Click the πŸ“‹ copy icon button beside it to copy the full list to your clipboard.

5. More Usage Examples

Check the built-in CommonCommands.cs and DevSuiteCommandsTesting.cs for comprehensive usage examples covering categories, groups, commands, values, buttons, saved prefs, adapters, and more.

Support the Project

If you find DevSuite helpful, please consider giving it a ⭐ on GitHub. Your support helps the project grow and stay active!

Feedback & Contributions

Feedback, bug reports, and feature requests are welcome! If you encounter any issues or have suggestions for improvement:

  1. Check the Known Issues section.
  2. Search through existing GitHub Issues.
  3. If your issue hasn't been reported, feel free to create a new one.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-Party Notices

This package includes third-party assets:

Author

Sergey Tarasenko

Known Issues

  • MemoryPack Serialization: If you are using MemoryPack, having an .asmdef file in the root of your Assets folder may prevent the suite from correctly saving/loading panel settings.
  • Managed Code Stripping: When the managed code stripping option other than "None" is enabled, Unity removes unreferenced code. This can lead to the DevSuite being stripped from the build, as it may not be directly referenced by your game code because of relying on reflection for discovering attributes. Maximum supported level for Managed Code Stripping is "Low". For higher values you need to add a link.xml file to your project. See Managed code stripping for more information.

About

DevSuite is a powerful collection of custom editor and runtime tools designed to streamline the debugging and troubleshooting process in Unity. It provides a flexible and extensible framework for managing commands, monitoring performance, viewing logs and objects hierarchy directly within your application or the Unity Editor.

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages