Setting up P4Win for Unreal Engine 4

Guide to installing, setting up, and syncing builds with the Perforce P4Win windows client for use with Unreal Engine 4.


This document covers the steps in setting up the P4Win client to connect to the Unreal Engine 4 depot and get a build of the engine.

To connect to Perforce, you need to set up a secure Virtual Private Network (VPN) Connection to Epic Games .

For other general tips, see the Setting up Perforce page.


Run the P4Winst executable installer.

  1. On the Perforce Installation Configuration page, User Installation is selected by default. Click Next.

  2. On the User Installation page, all of the components are selected by default. Click Next.

  3. On the Perforce Client Installation Directory page, determine the destination directory. C:\Program Files\Perforce is browsed to by default. Click Next.

  4. On the Perforce Client Configuration page, enter the following information: Server Port: (available through the US and East Asian VPN) or (primary for those connected through the East Asian VPN). Username: provided in original UDN welcome email, typically your Team Name (NOTE: this is different from your UDN login information).

  5. Click Next.

  6. On the Perforce Installation Summary page, review the installation information. Click Install.

  7. On the Perforce Installation Closing Summary page, choose whether or not you wish to reboot. Click Finish.

NOTE: You can later reconfigure the IP address, as needed, via the Settings menu. Please use the name to connect to the server, not the resolved IP address. The IP address may change if the server computer is changed; but the name will remain the same!

Configuration - ClientSpecs

Just a few easy steps!

If you are a content developer, or if you would simply like to run the example game or editor without building, you are looking for the UE4 Build. Otherwise, you are looking for the UE4 Source Code, which must be compiled.

  1. Connect to Epic Games through the VPN connection.

  2. Run P4Win.

  3. If the initial Client Workspace Wizard dialog appears, click Cancel.

  4. Select the View Clientspecs button to show a list of Perforce Clients. If a list does not appear, click the Refresh button.

  5. Right-click on the appropriate template: If you want source code only: In the right Perforce Clients pane, find UE4_Template_Code. If you want source code but no UT3 content: In the right Perforce Clients pane, find UE4_Template_Code_NoUT3. * If you want executables and not source: In the right **Perforce Clients** pane, find **UE4_Template_Build**.

  6. Select Create/Replace Client Using UE4_Template_(Build/Code) as Template....

  7. A dialog will appear. Fill in the following information: If you are a licensee: Client Name: UE4_Licensee_[TEAMNAME] (or otherwise ending with your UDN username or team name) If you are a contractor: Client Name: UE4_Contractor_[USERNAME] (or otherwise ending with your UDN username or team name)

  8. Click OK.

  9. A Perforce Client Specification will appear. Set your Root to a drive or directory on your local machine - something with many, many gigabytes free. The full directory path should have no spaces, or else you may have trouble later on playing levels from the editor. All the other defaults are fine.

  10. Click Update.

  11. If the Client Workspace Wizard dialog reappears, click Cancel again.

  12. If you are prompted to do a full sync to head revision, decline the offer. This will prevent receiving several gigabytes of data that you will have to replace shortly.

  13. In the right pane, right-click on the clientspec you just created, and choose Switch to UE4_Licensee_[USERNAME]. (this may happen automatically)

  14. Right-click on the clientspec again, and choose Set Default Client to UE4_Licensee_[USERNAME].

Now you are all set!

Clientspecs are created on a per-machine basis, because they keep track of the exact revision of each file that has been stored on that machine's hard drive in the selected directory. Thus, if you ever need to start syncing from a different PC, you will need to repeat this process to create a new clientspec on that machine.

IMPORTANT NOTE: If you are an anonymous user you will want to create a clientspec that is named: UE4_Anonymous_# where the # matches your Anonymous userid (e.g. UE4_Anonymous_8). Additionally, you will not want to put any url names in any of the fields. And you may not want to have a machine name that is recognizable. All of those fields can be seen by other users if they search the users or clientspec listings.


If you experience the following error when viewing the depot:

WARNING: //depot/* - no permission for operation on file(s).

... you are using an unrestricted view clientspec. Please be sure to base your clientspec off of one of the defined templates.

As of version 2008.1, unrestricted clientspecs are no longer supported because they are bad for server performance.

If you are using one of the defined templates, be sure that you are not viewing the entire depot. Use the client view of the depot, instead.

Getting the Latest Build

Depot - Client View of Directories

To the left there should be Client View of Depot pane. Expand the //depot tree. There should be an UnrealEngine3 directory which contains everything to build and run UnrealEngine3. You may also see one or more of the following directories:

  • PhysX - contains the common files for the physics middleware; depending on your agreement, you may also see additional directories and files.

For more information, see the directory layout page.

When synchronizing, lots of downloading will progress in the log window. "Sync completed with no warnings or errors" is what you are looking for when it is done.

Unreal Engine 4

In the UnrealEngine3 directory are several subdirectories: Binaries, Development, and Engine; and two game directories: ExampleGame and UTGame.

ExampleGame is the most minimal game implementation offered by Epic, and can be a good place for getting started in creating your own game project if your game is not very similar to Unreal Tournament.

UTGame is based on Epic's UT3 – released in 2007. This is a good starting point for understanding how to create a commercial game in development, and thus provides a complex example showing exactly how Epic uses the engine. Be aware that the source available in UTGame is a lighter version than what was used in the final version. We recommend using UTGame as an example, rather than extending from UTGame. You are welcome to use any C++ or Unrealscript code in UTGame for your game project, but you cannot ship any of Epic's content (textures, meshes, levels, sounds, etc.) in your game.

For UnrealEngine3, most of Epic's content is located in the game-specific directories, so if all you want is the engine source, you can simply sync to the //depot/UnrealEngine3/Development directory. You can highlight specific directories as desired, for example, to grab the latest content for ExampleGame without updating UTGame content.

Sync - Download

Once you have selected the directories to update, Right-click and select Sync to Revision, Label, Changelist, or Date.... Choose the Other radio button to sync to either a specific changelist or label.

Get the Files

Once either a changelist or label has been selected. Click Sync Files. Do NOT sync to the head revision as it may contain code that does not compile, or worse, is subtly broken.

Working with Source Control

Almost any file can be integrated into source control.

The lifecycle of the files in your project can be managed via common commands:

  • Check out

  • Submit, or check in

  • Revert, or roll back

  • Revisions - history

In addition to working with source control directly in Perforce, you can also use the editor tools. See SCC Integration for information on how to manage content packages from within the Editor itself.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback