Runs specified console commands after PIE. Allows to manage and trigger your commands over a simple UI.

Technical Support

For questions or additional technical support please contact us per Mail or join our Discord server.

Installation

For consistent usage by a team it’s recommended to install this plugin as part of the project; So every team member can use this tool. To do this, perform the following steps after you have purchased the plugin:

  1. Open the Epic Games Launcher and navigate to the plugin in you ‘Library’.
  2. Press the ‘Install to Engine’ button and select the engine version that matches to your project. This will download the plugin files into your local installed engine.
  3. Locate the plugin in the engine’s plugin directory (usually found at C:\Program Files\Epic Games\UE_5.x\Engine\Plugins\Marketplace). Copy the entire plugin folder.
  4. Paste the copied plugin folder into the Plugins folder you created in your project directory.
  5. Open your project in UE and check if the plugin is available. Go to Edit->Plugins. In the Plugins window, search for the plugin. Check if the ‘enabled’ checkbox is set. The plugin should be enabled by default.

CmdOnPlay plugin list entry

If you have a custom build version of the Unreal Engine it can be necessary to compile the plugin locally.

  1. Delete the Binaries and Intermediate folder in the plugin folder that you have copied to remove the old binaries.
  2. Launch your project by clicking on your .uproject file
  3. Press ‘Yes’ on the widget that asks for rebuilding modules.

Usage

The CmdOnPlay Plugin provides a simple integration in the default toolbar. So you can access them fast and switch configurations very easy related to your current needs.

CmdOnPlay toolbar entry

The toolbar entry contains two parts. On the left side the activation button (1) that controls if the plugin is active or not. Right of that the context menu (2) that provides access to the configuration of the current available commands.

Activation Button

This button toggles if the plugin will perform any trigger. It’s the general on/off button of the Plugin. Both states are visualised with different icons.

Enabled Enabled icon This icon show that the plugin is enabled. Commands will get triggered related to the configuration when the PIE will start.

Disabled Disabled icon This icon indicates that the plugin is disabled. No commands will be triggered when PIE starts.

Context Menu

The context menu contains all configured commands and provides an intuitive interface to setup what commands will be triggered and what kind of parameters are used for it.

The menu is split into three major parts. If you have a bigger amount of entries a search bar (1) helps to find/filter the available list of existing command entries. Below them is the main area that lists all commands that are part of a command set. Multiple command sets will appear in a list after each other. In the example picture we have a DefaultCheatManager set(2). Last but not least all custom commands are listed that are not part of a set(3).

Configuration contect menu

Every entry consists of a checkbox to control if it should get triggered or not(1) and a user friendly name to identify the command(2). Optional is a field that can contain parameters if the command require one(3). If this field is empty the configured default parameter will be shown and used if it gets performed. It’s possible to override the default one by adding an override into this field. Additionally a perform button(4) that will trigger the command immediately. This is only available in play mode and will not consider if the command is marked as active or not.

context menu entry

Settings

All settings for this plugin will be configured into the Editor Preferances. To start your configuration open the Editor Preferences via “Edit->Editor Preferences…” and scroll down to the Plugin section. There you can find the CmdOnPlay setting page(1).

The most setting changes require a engine restart before the got active. A Editor popup will apear if this is necessary.

CmdOnPlay Settings

General Section

In the general section of the plugins configuration it’s possible to remove the tool bar entry of this plugin(2). This is useful for people that like to have a clean tool bar in the editor and did not like to use this plugin.

Features Section

In the feature section it’s possible to enable different optional features that are provided by the plugin(3).

Enable
This checkbox controls if the plugin will perform any triggers on PIE. It’s the same control flag as the toggle button in the tool bar controls. Activate it to perform selected commands on the triggers if PIE is running. On deactivation the plugin will not perform any command independent from the enabled configuration.

Default: false

Run On Simulation
Define if the CmdOnPlay will be running on simulation runs too.

Default: true

Reset CVars on PIE
If this feature is enabled the Plugin will reset all detected CVars and reset them to their default state. This will be done by checking every entry in their command lists if it is pointing to a CVar and saves the default value on engine start. This value will then be restored on PIE. This feature can support you to keep sure that the game starts always in the state that you have in mind. No forgotten changed CVars in testing sessions that interfere with your next PIE run.

Default: false

Commands definition (Table List and Custom)

The heart of the plugin; The definition of the available commands that can be used. In the Command Table List get all prepared command sets linked (4) and the custom Command allow you to specify additional commands if required (5).

Data Asset (Command sets)

A command set is a data driven way to specify a syntactic group of commands. This helps a lot to unitize the workflows and provide debug capabilities in an easy way. The plugin brings a custom asset type that can be used for this. The asset type can be found in the Editor Utilities section.

To create a new command set right click in the content browser and navigate to Editor Utilities->CmdOnPlayData. The name of the asset that is used as name of the command set as well. Open this asset to define as many commands as you need.

By default the example DefaultCheatManager command set is linked. This one contains a couple of useful cheats that come with the standard Unreal CheatManager.

CmdOnPlay Data set

Basic Team Settings

On the reason that everything is configured in the Editor Preferences all users are able to configure their own setting related to their needs. All user specific changes in the settings will be stored localy in the EditorPerProjectUserSettings. So everyone can have their own sets and commands without need to think about to interfere with the config from other teammembers.

But it’s also possible to prepare some basic configuration and deliver them to your team. Add the [/Script/CmdOnPlay.CmdOnPlaySettings] with you decired default configuration in you project DefaultEditorPerProjectUserSettings.ini.

Example entry:

[/Script/CmdOnPlay.CmdOnPlaySettings]
bShowToolbarEntry=True
bEnabled=True
bRunOnSimulation=True
bResetCVarsOnPIE=False
+CommandTableList=/CmdOnPlay/DefaultCheatManager.DefaultCheatManager
+CommandEntriesList=(Name="FPS",Command="stat fps",DefaultParameter="",DefaultParameterDescription="",PerformMode=World,TriggerMode=OnWorldCreated)

Command entry definition

All command entries need to be defined in the same way. It does not matter if they get used in a command set or as custom command.

CmdOnPlay entry

Name (Required)

User friendly specifier the identify your command entry. It’s recommended to be as descriptive as possible; Maybe something related to what happens if it gets triggered.

Command (Required)

The command that will be performed if the entry gets triggered. It can be everything that can be executed from the engine commandline like Console Variables (CVars) or commands.

Default Parameter (Optional)

A default parameter that is used with the specifierd command. If a value is given the command is recognised that a parameter is available and the parameter field in the toolbar context menu will apear. This value can be overriden from the user in the context menu.

Default Parameter Description (Optional)

Hit for the parameter how it should be used. This will be shown as tooltip in the context menu.

Perform Mode (Required)

Define where the command will be executed.

Select between:

  • World
  • Player Controller

Triggers (Required)

For more complex projects it’s necessary to perform commands at different points in the game initialization flow. Every command get its own trigger mode. All commands with the same mode will be performed together if the point in the initialization flow is reached.

  • OnWorldCreated
  • OnMatchStarted
  • OnPlayerControllerCreated
  • CustomTrigger

World Created
Triggers after World got created. The World is already initialized and ready but BeginPlay() is not performed.

Match Started
Typically for multiplayer games to signal the start of a match. BeginPlay() has already been performed.

PlayerController Created
Checks if the local player controller gets created and is ready to use.

Custom Trigger
If you have a game that requires a more complex player character initialization workflow like a multiplayer game. It was possible that the CmdOnPlay calls the commands too early. Now you can switch to a ‘Custom Trigger’ mode to control the point in time to perform the commands in cpp.

Link the plugin in your projects Build.cs like:

public class CmdOnPlay_Project : ModuleRules
{
    private string PluginsPath
    {
        get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "../../Plugins/")); }
    }
    
    public void AddCmdOnPlay()
    {
        // Linker
        PrivateDependencyModuleNames.AddRange(new string[] { "CmdOnPlay" });
        // Headers
        PublicIncludePaths.Add(Path.Combine(PluginsPath, "CmdOnPlay", "Source", "CmdOnPlay", "Public"));
    }
    
    public CmdOnPlay_Project(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
    
        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

        PrivateDependencyModuleNames.AddRange(new string[] {  });

        AddCmdOnPlay();
    }
}

You can include the plugin via #include "CmdOnPlayModule.h" in your code and trigger the CmdOnPlay with the following snippet:

#if UE_EDITOR
    if(FModuleManager::Get().IsModuleLoaded("CmdOnPlay"))
    {
        FCmdOnPlayModule& CmdOnPlayModule = FModuleManager::GetModuleChecked<FCmdOnPlayModule>("CmdOnPlay");
        CmdOnPlayModule.TriggerCmd();
    }
#endif

Don’t forget to guard the trigger code with #if UE_Editor then the CmdOnPlay Module is only available in the Unreal Editor and will not be deployed into builds. Five custom trigger points are supported by default.

Limitations

The commands can be executed only on Play in Editor (PIE) in the UE Editor. Standalone runs are not supported even if these was started from the Editor. Multiplayer starts are not supported, except the PIE session.