Cog
Cog is a set of debug tools for Unreal Engine built on top of Dear ImGui
Install / Use
/learn @arnaud-jamin/CogREADME
[!IMPORTANT] The way Cog integrates in your project has changed. If you update Cog, please read the integration guide.
Cog
Cog is a set of debug tools for Unreal Engine built on top of Dear ImGui
- Video
- Sample Executable (Windows) (500 MB)
Cog provides:
- ImGui windows to inspect and configure various Unreal systems (Core Engine, Enhanced Inputs, Gameplay Abilities, AI)
- Window management with persistent configuration and layouts.
- C++ and Blueprint functions to log and debug draw within Log Categories.
- Control over the server regarding debug draw, logging, spawning, cheats.
- NetImgui support to ease the debugging of game server.
General Info:
- Cog can be used both in editor and package builds. It is disabled by default on shipping builds.
- Press the
[F1]key or use theCog.ToggleInputconsole command to open the ImGui Main Menu. - Many windows display their contents based on a selected actor. The selector actor can be chosen using the
Engine/Selectionwindow or widget. - Widgets such as Stats (FPS, Ping), Time Scale, Actor Selection, Console, can be added in the main menu bar from the
Window/Widgetsmenu.
Cog Windows
Cog comes with the following windows:
<details> <summary>Abilities</summary>Displays the gameplay abilities of the selected actor.
- Click the ability checkbox to force its activation or deactivation.
- Right-click an ability to remove it, or open/close the ability separate window.
- Use the 'Give Ability' menu to manually give an ability from a list defined in a Data Asset.
</details> <details> <summary>Actions</summary>
Displays the state of Input Action.
- Can be used to inject inputs to help debugging, as loosing window focus when breaking in the code doesn't affect the state of injected inputs unlike real inputs.
https://github.com/user-attachments/assets/2497900e-d2d9-4af9-abef-44f7f31c2726
</details> <details> <summary>Attributes</summary>
Displays the gameplay attributes of the selected actor.
- Attributes can be sorted by name, category or attribute set.
- Attributes with the Current value greater than the Base value are displayed in green.
- Attributes with the Current value lower than the Base value are displayed in red.
- Use the options 'Show Only Modified' to only show the attributes that have modifiers.
</details> <details> <summary>Behavior Tree</summary>
Displays the behavior tree of the selected actor.
Displays the blackboard of the selected actor.
</details> <details> <summary>Build Info</summary>
Display the build information such as the build version, changelist, date, target, and so on.
</details> <details> <summary>Cheats</summary>
Used to apply cheats to the selected actor.
- Cheats are replicated to the game server to be executed.
- Key modifiers can be used to change which actor should be affected by the cheat:
[CTRL]Apply the cheat to the controlled actor[ALT]Apply the cheat to the allies of the selected actor[SHIFT]Apply the cheat to the enemies of the selected actor
- Optionally, cheats applied to the local player character are automatically reapplied.
- Cheats can be defined in a Data Asset. Cog provide two default cheat execution (Apply Effect, Activate Ability).
- Cheat executions can be defined in blueprint.
</details> <details> <summary>Collisions Tester</summary>
Used to test collision queries
<video src="https://github.com/user-attachments/assets/95106f62-8a70-43ed-871d-c2f9380418a3" />
</details> <details> <summary>Collisions Viewer</summary>
Used to inspect collisions in the world
- The query can be configured in the options.
- It can be used to better understand what object collisions are blocking a raycast.
</details> <details> <summary>Command Bindings</summary>
Used to configure the command bindings.
- Bindings are used to trigger console commands from a keyboard shortcuts, which are saved in
Saved/Config/WindowEditor/Input.ini(in editor).
</details> <details> <summary>Console</summary>
Used as a replacement of the Unreal console command.
- The console exist as a window and a widget (placed in main menu bar).
- The console widget can optionally get the keyboard focus when the main menu bar is shown.
- Use the Keys Up/Down or Tab/Shift-Tab to navigate in the command list.
- The console settings can be changed in the console window menu, or by right-clicking the widget.
</details> <details> <summary>Debug Settings</summary>
Used to tweak how the debug display is drawn.
</details> <details> <summary>Effects</summary>
Displays the gameplay effects of the selected actor.
- Mouse over an effect to see its details such as its modifiers, the gameplay tags it grants, the remaining time, etc.
</details> <details> <summary>Gamepad</summary>
Display the state of the gamepad
- Can be displayed as an overlay
- Can be used to inject inputs to help debugging, as loosing window focus when breaking in the code doesn't affect the state of injected inputs unlike real inputs.
https://github.com/user-attachments/assets/56edc823-7130-4cfe-9af9-1c565f7286b9
</details> <details> <summary>Inspector</summary>
Used to inspect and modify an Object properties
- Inspect the selected actor by default
- Favorites can be added with a custom function defining what happens when the user press the Apply button (typically this can be used to modify and apply the Game User Settings)
- Manage a history of inspected objects.
</details> <details> <summary>Levels</summary>
Can be used to load specific levels
</details> <details> <summary>Log Categories</summary>
Can be used to activate and deactivate log categories
- Activating a log category set its verbosity to VeryVerbose.
- Deactivating a log category set its verbosity to Warning.
- The detailed verbosity of each log category can be shown by using the Option menu.
- A client can modify the verbosity of the server.
- The log categories are used to filter both the output log and the debug draw.
</details> <details> <summary>Metric</summary>
Gather various values sent by the selected actor and compute their rate per second. This is typically used to compute the damage dealt or received per second.
- The following code shows how to add a metric:
// Adding a metric
FCogDebugMetric::AddMetric(this, "Damage Dealt", MitigatedDamage, UnmitigatedDamage, false);
</details> <details> <summary>Net Emulation</summary>
Used to configure the network emulation
</details> <details> <summary>NetImgui</summary>
Handle connections to a NetImgui server.
The following image shows the editor running along a dedicated server. The NetImgui server displays the dedicated server imgui windows.
This can be used to debug the state of the game server. For example the behavior trees are only available on the game server.
</details> <details> <summary>Notifications</summary>
Use to display and configure notifications
