How to correctly setup perforce with a Unreal Project that uses C++ Code

I need to know how to set up everything…

I’ve been through every thread I can possibly read into

Currently I have my Content, Config, Source, and u.project in the depot.

I can download, compile the project, and run everything correctly, but when I try to submit to source control it says “Unable to submit (file) to source control”

Has the file in question been added?

It’s a change to a file currently in the content folder

Is the file checked out?

Also, is this from the Editor or from P4V ?

Could you post your full log file to this thread so we can help diagnose your problem faster? When you try to submit the files and fail as above, close the editor and post the log you will find in GameName/Saved/Logs.

LogSourceControl:Error: MistOfTheDark-Ryan client specs rejected due to host name mismatch (Hailey-Patterson)
LogSourceControl:Error: MistOfTheDark_Ryan client specs rejected due to host name mismatch (Hailey-Patterson)
LogSourceControl:Error: Ryan_Hailey-Patterson_4016 client specs rejected due to host name mismatch (Hailey-Patterson)
LogSourceControl:Error: Ryan_Hailey-Patterson_7382 client specs rejected due to host name mismatch (Hailey-Patterson)
LogSourceControl:Error: Ryan_MistOfTheDark client specs rejected due to host name mismatch (Hailey-Patterson)
LogSourceControl:Error: test client specs rejected due to host name mismatch (Hailey-Patterson)

That seems to be the problem… I didn’t know that it showed anything to output log otherwise I would have posted that earlier…

I created a lot of workspaces trying to get this to work correctly…

However, it’s working through the client. I can submit through the client, just not through the engine itself.

We filter client specs in the editor based on host name, whereas P4V does not. You can use a blank hostname for your workspace if you want to work on multiple machines, but it can sometimes produce unexpected results (like the server not syncing all your files correctly because i thinks you already have them).

How exactly would I set it up to where it works in the editor then? IE how would I set up my workspace with a hostname…

The hostname is set in your workspace, so is editable in P4V (its the “host” field in the workspace). Usually this is set by default (on Windows, at least) to be the machine name you are creating the workspace from.

Okay, fixed the hostname issue, now I’m getting this:

LogSourceControl:Error: MistOfTheDark_Ryan client specs rejected due to root directory mismatch (c:/users/ryan/documents/unreal projects/mistofthedark_ryan/)
LogSourceControl:Error: Ryan_Hailey-Patterson_4016 client specs rejected due to root directory mismatch (c:/users/ryan/perforce/ryan_hailey-patterson_4016/)
LogSourceControl:Error: Ryan_Hailey-Patterson_7382 client specs rejected due to root directory mismatch (c:/users/ryan/perforce/unreal project/)
LogSourceControl:Error: Ryan_MistOfTheDark client specs rejected due to root directory mismatch (c:/users/ryan/perforce/ryan_mistofthedark/)
LogSourceControl:Error: test client specs rejected due to root directory mismatch (c:/users/ryan/documents/unreal projects/testest/)

OK, this means that your workspace is not mapped to where you have your project on your local drive - did you happen to copy the files from elsewhere, or access them via a different workspace?

Again, to set the root directory of the workspace you can do this in the workspace view in P4V.

Fixed. It wasn’t that it was a source control issue, my host and root files weren’t setup correctly. Thank you Epic staff for your help <3

How did you set these up?