Perforce Usage with Unreal 4

I’ve recently set up perforce with UE4 - and I’ve followed the steps here : Can someone help me with getting Perforce setup with Unreal Engine 4? - World Creation - Unreal Engine Forums

I’ve created a workspace that uses my project’s location, committed it to a depot and switched the feature on inside UE4 - it worked, I have the green logo at the top and all my assets have the “tick”

My question is, how do I effectively use source control after these steps?

I’m used to GitHub with Unity, which consists of making branches from the master, making changes and merging. I’ve searched around the net and found very little on how to use this workflow.

Any help would be greatly appreciated.

Hi,

Here’s a quick run-through of how the workflow goes.

Checking Out

Generally the workflow is to edit assets as you would normally. This should prompt you to ‘check out’ assets when you modify assets if you have the option “Prompt for Checkout on Asset Modification” selected in Editor Preferences->Loading & Saving->Source Control.

Alternatively you can right-click on an asset and ‘Check Out’ the file from the Content Browser.

13855-checkoutcb.png

When a file is checked out, it is highlighted with a “Tick” in the Content Browser.

Checking In

When you are happy that you have completed a section of work, you should ‘check-in’ the files that you have been working on. To do this you can either:

  • Select the files you have been working on in the Content Browser, right click and choose ‘check-in’ (note that you can right-click on a folder to do this as well).
  • Choose File->Submit To Source Control… from the menus. This will scan your project for files that need checking in (or adding) to source control.

When you have selected your files to check-in, you will be presented with the Submit Files dialog:

13856-submitdialog.png

You can then add a description of your changes and commit/check-in the files for others to see.

Syncing

If you want to get changes that other people have made, you can right-click on files or folders in the Content Browser and select “Sync”. Alternatively you can ‘Sync’ using an external program such as P4V. It is recommended that you shut the editor down if you do this however, as it may lock some files for editing while open.

When a file is ‘out of sync’ (i.e. a newer version exists on the Source Control server to the one you have locally) then it is displayed with a “!” in the Content Browser.

Adding

Similar to the Check-Out workflow, you can auto-add new files to source control using the “Add New Files when Modified” option in the preferences. Files that are added appear with a “+” symbol on them in the Content Browser and can also be checked in (as above for files that are checked out).

Deleting

Deleting assets that are already in source control is more complex as they are usually referenced by something else. We try to make this as transparent as possible, but it can be somewhat confusing.

If you select a file in the Content Browser and press “Delete” (or select it from the right-click menu) then you will be presented with the delete dialog. Once you have chosen how to handle the deletion, the file will generally be replaced by a hidden ‘asset’ known as a [Redirector][3]. If you want to clean up the redirectors that are created when deleting assets you can right-click on a folder in the Content Browser and select “Fix Up Redirectors in Folders”.

Thank you for the very detailed reply! It’s really helped my project, much appreciated.

Caming from a git/svn background, is there a way to branch a project in unreal and perforce?
I see options only for add, delete, check in/out, but not for branching.

Do i need to use the external client P4V?