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.
I created a new project in Unreal using the first person blueprint with starter content
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.
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.
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
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)
Now after making a change I compile and attempt to save, which then brings up the menu to check out, make writable, or cancel
Clicking check out selected bring the message above about being unable to checkout from source control
[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.
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.
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.
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.
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)?