Unreal Engine Newest Toy: How to Set It Up and Get Started

Unreal Engine Newest Toy: How to Set It Up and Get Started

Disclaimer

This article's approach is a very hacky way to get it up and running. The optimal workflow would include the command below in P4V Utils, distribution via Unreal Game Sync, and connection to Horde.

However, describing such a setup would yield a book.

So we are going over the bare minimum to get Submit Tool up and running on your end before to commit to such a workload.

What is Submit Tool?

Submit Tool is a standalone application. It displays a developer friendly UI to allow them to run check validations on a specific Perforce changelist before submitting it.

The main dialog frame looks like this:

Here you can edit the changelist name or add any custom properties (e.g.: the name of the reviewer)

And the validators section look like this:

Here tests will be run on your changelist content, changelist description and overall project (e.g.: checking compilation for a specific platform + configuration combo).

Why use Submit Tool?

Submitting to perforce was already complicated enough, why should you add extra steps to it?

Submit Tool brings brings safety and a standardized process to submitting. For instance, a programmer might run in DebugGame for weeks without even touching the Development configuration.

There is a strong chance, submitting his changes will work just fine in all other configurations, but it's even better to catch a potential issue before the code is even submitted by compiling different configurations locally.

This saves a lot of time because developers don't need to wait for the continuous integration builds to spit out errors, just to try again and wait again...

Building Submit Tool

Open a command prompt and navigate to your source engine, like:

powershell

cd "F:\UE\Source"
        

Then run the following 2 commands, make sure to replace the destination both with your own:

powershell

.\Engine\Build\BatchFiles\RunUBT.bat -Target="SubmitTool Win64 Development" -Target="UnrealPak Win64 Development" -Project="..\Programs\SubmitTool\SubmitTool.uproject"

.\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -platform=Win64 -project=SubmitTool -skipcook -stage -pak -nodebuginfo -nobootstrapexe -stagingdirectory="*** YOUR PATH***" -NoCodeSign        

After this, the Submit Tool should be under ***YOUR PATH***.

Then navigate to SubmitTool\Windows\Engine\Binaries\Win64 and there you can find the SubmitTool.exe.

You can launch it by double-clicking it, however, without the required command line arguments the tool won't function properly.

Launching Submit Tool from Perforce

Now we are going to dive into Perforce and register it as a custom Tool:

1. Navigate to Tools → Manage Tools → Custom Tools...

2. Select New → Tool...

3. Fill out the Tool descriptor

Name - "SubmitTool" is recommended

Application - give the full path to SubmitTool.exe (as described above in the previous section)

Arguments - here you will need to fill out some information related to your local perforce setup:

-cl %c  -server ssl:YOUR-SERVER:1666 -client YOUR-CLIENT -user YOUR-USER        

-cl %c will ensure SubmitTool knows what changelist it should refer to, while the rest is required to identify the current user.

Add to applicable context menus - enabled.

4. Hit Ok and close all the menus

Note: As mentioned in the initial disclaimer, this is not ideal. By launching the SubmitTool via P4V Utils, we will be able to dynamically get the information about the user and only pass the CL number.

Testing our setup

Now when you right-click a changelist inside Perforce you should see a new SubmitTool entry which launches our new shiny tool with the appropriate launch parameters.

You can confirm this by checking the CL number, CL description, stream, workspace and properly set up.

Or by checking the Submit Tool logs for any errors.

How P4V Utils, UGS and Horde play a role in this

In an ideal scenario, developers don't have to set up things manually on their end. This is where the "Unreal Suite" comes into play.

When developers run/open Unreal Game Sync, it should download P4V Utils from Horde. P4V Utils will then register the tools in Perforce directly and act as a bridge between the 2 (e.g.: feeding additional launch information into SubmitTool like current user, workspace, server).

Final notes

If you have any feedback, complaints or questions, feel free to reach out.

Ari Arnbj?rnsson

Senior Software Engineer, Developer Relations at Epic Games

2 个月

It's easier to just launch ushell and type ".build program SubmitTool" ??

Ari Arnbj?rnsson

Senior Software Engineer, Developer Relations at Epic Games

2 个月

Secretly? I tweeted about it ??

  • 该图片无替代文字

要查看或添加评论,请登录

Alexandru Oprea的更多文章

社区洞察

其他会员也浏览了