Unable to Checkout with Perforce

I have set up perforce and connected it to UE4 (4.2.0) by using the toolbar under file>connect to source control. After doing this, I am unable to checkout any items in the project. What am I doing wrong? I’m the only one using the work space and I am using the same computer for the server and client. If there is any other info you need to figure out what I’m doing wrong let me know.

This is the message I get:
“Unable to checkout from source control!
The following assets could not be successfully checked out from source control:
/Game/Blueprints/MyCharacter”

EDIT:

I have created a brand new project to test this and recreate all the steps I took to connect perforce to this project. Also I will provide the log for more info.

To start with, before starting up Unreal, I installed the perforce server and visual client with default settings. Though I’m not 100% with how everything with that program works, I at least know that you check out items to lock them from being changed by someone else, then submit when you’re done changing it.

  1. I created a new project in Unreal using the first person blueprint with starter content
  2. Start up P4V, choosing to make a new workspace and I direct the folder to the Unreal project folder I just created. All other settings I leave at default.
  3. The client connects without problem and I right click the highest folder and select mark for add > then under the pending tab I hit submit, enter a description and hit ok.
  4. In the Unreal editor, I go to File > Connect to Source Control - I am able to select the appropriate workspace I just created without issue
  5. I then open up a file to edit - in this case the mycharacter blueprint and make a small change to test (just deleting the jump function in the graph)
  6. Now after making a change I compile and attempt to save, which then brings up the menu to check out, make writable, or cancel
  7. Clicking check out selected bring the message above about being unable to checkout from source control

Log:

[2014.06.09-23.55.55:448][363]LogSourceControl: Attempting ‘p4 fstat C:/Users/Joe/Documents/Unreal Projects/DeleteMe/Content/Blueprints/MyCharacter.uasset’

[2014.06.09-23.55.57:065][363]LogSourceControl: Attempting ‘p4 fstat C:/Users/Joe/Documents/Unreal Projects/DeleteMe/Content/Blueprints/MyCharacter.uasset’

[2014.06.09-23.55.57:163][363]LogSourceControl: Attempting ‘p4 edit C:/Users/Joe/Documents/Unreal Projects/DeleteMe/Content/Blueprints/MyCharacter.uasset’

[2014.06.09-23.55.57:187][363]SourceControl:Error: Error C:/Users/Joe/Documents/Unreal Projects/DeleteMe/Content/Blueprints/MyCharacter.uasset - file(s) not on client.

Looking through the log, this seems to be the problem, files not on client. I have tried going into the specific file and marking for add → submiting… not sure what I have/haven’t done.

Hi,

Could you post a log of the issue so we can help diagnose the problem? Logs are found in \Saved\Logs directory.

Edited main question to include the log, let me know if you need the entire log or anything else.

It sounds like it’s likely there is something wrong with your workspace setup. Could you post your full log please?

Also worth re-iterating here (as you mention right clicking on the topmost folder and adding) that you should not be adding your project’s Intermediate, Saved, DerivedDataCahe or (optionally) Binaries folders to source control.

It turns out that I did not set up the workspace correctly, it is a bit confusing. When creating a new workspace, you need to select the folder “Documents/Unreal Projects/MyGame” Then you only right-click the Content folder inside your project folder and mark for add and submit it to the depot. After that going to file>connect to source control, everything worked correctly. Thanks very much to Tom for your help.

Okay, sorry to re-open this but I need to

I have a project that uses C++ code, but C++ code projects need the “Config” and “Source” folders.

How do I set this up to work without getting the above errors?

Thanks!

You should just be able to add the Config and Source directories to P4 (using P4V).

I have, yet I am still getting this error. When I only use the content folder I have no problems, but when I add the source and config folders it doesn’t work.

Because you also have to include the .uproject file to make the config files actually work.

Does this mean your problem is solved?

No, because it still isn’t checking out correctly.

How would I set it up to work with source files?

When I just put the “Source” folder there it doesn’t load the scripts.

What scripts are you referring to? Are you using a script plugin, or are you referring to the C++ source files?

The editor doesn’t load or display C++ source files itself (although we were thinking of perhaps doing that at some future point), you need to use Visual Studio (or XCode on Mac) for that.

I’m referring to C++ source files that you “add to project”

Not talking about actually editing the files, I’m talking about loading them into the project.

I downloaded everything, then I attempted to set the gamemode (one defined by a C++ script) and the gamemode isn’t there.

This seems to have developed into another problem unrelated to Perforce - can you post a new AnswerHub query detailing your issue so we can track it better (and others can search for it later)?

It’s still related to perforce. The problem is that you can’t “check out” correctly when you have the source files and uproject included in your depot. I set up another thread though.
I seriously need this fixed quick, so I would appreciate your help.
https://answers.unrealengine.com/questions/107261/how-to-correctly-setup-perforce-with-a-unreal-proj.html