#source-control
1 messages · Page 27 of 1
Anyone experienced with Plastic SCM Enterprise?
How can I change my username?
When I opened the app and entered the server, it immediately use my PC username and I can't change it (Greyed out)
hey everyone
Ive been using unrael with git and github for source control
but recently I changed my azure repo and it is not working for my freind
the project says "built with a different engine, continue? " then fails to build, and when my freind rebuilds using vs 2022 it still says that
ur friend probably has the wrong VS packages installed. (or the wrong engine version but i'll assume you already checked that)
it worked before though? with the old repo
go to your VS installer and export your config, have ur friend remove his vs and reinstall and import it
hm, did you change ur gitignore? did you properly migrate everything? if you fully remove all files from your pc and pull a clean version from repo can you still run it(probably want to take a back up before you try this just in case)?
well, it works for me but not for him, and we both donloaded the same repo
ill try this
so I did this, and got the same error, but the build process worked,
does that mean my freinds vs config is different?
I would sanity check
- installed store engine versions are identical
- .uproject files are identical
- delete Binaries and Intermediate
- regen solution
- rebuild
"i did this" what is "this" what steps did you actually take and what did you do? because if you followed all the different potential causes i listed and followed through with checking them then ur friends vs config shouldn't be able to be different if you exported and he imported that config on a clean install.
By this I mean I re download everything on my PC, deleted all binaries including each plugging binaries and it worked, my friend didn't even have plugin binaries , although he did replace the uproject and the main projects binaries with a zip I sent and the error message changed
And by change I mean it required one less rebuild
Hey everyone,
We’re running into this on UE5 source build when starting the editor:
SourceControl: Error: P4ERROR: Failed to connect to revision control server.
SourceControl: Error: Connect to server failed; check $P4PORT.
Fail create ctx on the connecting client.
Failed to initialize SSL library.
NetSslTransport::SslClientInit SSL_load_error_strings: error:25070067:DSO support routines:DSO_load:could not load the shared library: The specified module could not be found.
A few things we've already tried:
Verified the correct libssl-1_1-x64.dll exists inside Engine/Binaries/Win64.
Copied DLLs closer to the editor folder manually.
Confirmed Perforce works fine after engine fully loads and manually connecting.
It seems like the engine tries to connect too early during boot, before SSL is properly initialized.
Feels like maybe an engine-side timing issue rather than a config problem?
Has anyone dealt with this before?
why did you have to remove binaries if you removed everything and did a fresh download? binaries shouldn't be in your source control so they should have been generated new by UE after you downloaded.
whats all in your gitignore?
Right, I think it might've been because I tried opening the project before checking, which generated them, and I sent those binaries to my friend who seemed to not be able to generate his version of the repos binaries and it works now?
Seems like a compiling issue, but it's fixed for now
don't share binaries unless you are making installer builds - each pc should be handling it's own Binaries and Intermediate folders ( they should never be in version control )
I mean I guess you can do it, but I don't think it is standard practice
well UGS is still giving you precompiled binaries, just not directly in the depot
true true
Still, I thought the best practice would be to actually create "Installer builds" if one is going in this direction
you can get away with it, but it's best to have something proper to fetch precompiled binaries since it'll drive programmers mad
yeah our artists hated compiling the engine
since we switched to them grabbing PCB's
they find it much better
Momentarily imagined artists getting unreal engine on circuit boards they plugged into pcie slots.
this is the way. best practice by far.
you post the USB stick with the binaries
oh pcb..
printed circuit boards, yeah same as in usb sticks
😛
Hey there... How many branches do you usually reccomend when working with mostly BP based assets in a medium sized team?
I heard it's overall best to use as few as possible, but I'm not a repo savvy so I'd like some layman explanation of the general idea
Exactly 1 : Mainline.
Recommendations
- Use Feature Flags to hide work in progress
- Mainline must always be functional
- Submit often - per fix, per small feature, daily is good minimum if working on a big feature
So no branches as I imagined hah
this is the way, when most everything is a binary blob
Or if any branches... Something that ABSOLUTELY doesn't touch BPs
So C++ based stuff is branch safe
Some advanced studios apparently do more branches/streams + have cross-stream locking
I had a feeling that was the case, merging a BP heavy branch into main felt like it violated the geneva convention
Typically c++ stuff bleeds over into blueprints though, so yeah, might not be that cut and dry
Hmmmh fair point...
yeah, it's no point fighting windmills. File locking is super critical
Also if you have it CI/CL : Build on every Change + Nightly Builds are a huge boon to catch silly mistakes fast. Jenkins, Horde, TeamCity etc
Noted... Thanks for the nice and easy explanation!
my pleasure
Hey guys!
I'm getting the following error for perforce: The filesystem 'P4ROOT' has only 1.2G free, but the server configuration requires at least 2G available.
Doing a lsblk I'm getting the following output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
├─sda2 8:2 0 2G 0 part /boot
└─sda3 8:3 0 1T 0 part
└─ubuntu--vg-ubuntu--lv 252:0 0 100G 0 lvm /
sr0 11:0 1 1024M 0 rom
Do I just need to increase the lvm volume or is there a way I can incrase this with perforce?
is the lvm volume actually at 98/100GB?
not sure 😅
It's a server running in a virtual machine, and looking at it, the virtual disk should have 1TB available
just found the p4 diskspace command :
p4 diskspace
P4ROOT (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
P4JOURNAL (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
P4LOG (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
TEMP (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
journalPrefix (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
.p4-extensions (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
.p4-traits (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
depot (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
lab (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
lab_fp (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
repo (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
spec (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
test_depo (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
unload (type ext4 mounted on /) : 1.2G free, 91.6G used, 97.9G total (98% full)
I think I need to increase some setting or something for perforce since there should be enough space on disk but p4 has not enough
yes but the partition holding ur data is only 100GB, so you have approx 900GB unused. this might make sense in a VM as you might not want to over-allocate space from the host machine to a VM.
so yeah u're using 98GB of the 100GB allocated to that volume, u'd need to extend the volume.
But shouldn't it expand automatically?
depends on ur set up, in this case it would not seem like it.
because the virtual disk only takes up 91.2GB right now
it might be that ur VM software simply extends the volume when u try to write more to it but P4 wants a bigger safety margin (2GB) than the VM. hard to say without knowing more. though to me it seems more likely the 100GB is a hard set value that u need to adjust manually.
yeah that would make sense, OS+P4*compression
again though this is largely assumptions because of a lack of information.
You know, I just dont w ant to increase the lvm and then I make it even worse, since the perforce installation is a premade perforce image.
Yea 😅
premade by who?
perforce
but i found a documentation from perforce, where this guy also increases it
Ok I just increase the volume and it appears to work now! 🙂
Thanks for help @ocean anvil !
o7
Fun fact… when you install Ubuntu with LVMs enabled, regardless disk size it will only allocate 100 gigs partition and keep the rest unused… really annoying “feature”
Dumb question but is their a good way to backup a perforce server (kinda tedious the way I do it)
so... the way to backup perforce server generally contains 2 steps:
- backing up metadata (the database)
- backing up archives (the data themself)
First generally requires taking a checkpoint and backing that one up
Second is usually done by rsyncing or something like that to secondary location (together with the checkpoint)
Perforce doesn't provide any built-in method for backing up, you could spin up secondary master instance and keep them in sync through high availability setup, but that's it
we personally run nightly script which performs the checkpoint rotation (also good for performance of the server as it compacts and cleans up the journal) and afterwards simply rsyncs archives to remote server together with the checkpoints, we keep 4 separate backup and every day we replace the oldest with the newest backup (so we have 4 days of backups)
it's fully automatic thing... but if you're running in cloud provider like AWS, you can simply let AWS create backups of the data partitions without having to do anything - we have to do this since we host on-premise
Thank you for your very detailed answer, I’ll try to have a script running as well to my rsync server
now that code for SubmitTool is released, has anyone gotten it set up and running?
interested in doing so for my studio
also need to know what that workflow is like in general
whats the SubmitTool , did a search didn't find anything on it.
It's a tool Epic uses internally to submit changelists instead of P4V; it enforces things like reviews and preflights
since we use reviews and preflights, it'd be neat to have something like this working, since right now with P4V there's no good way to "enforce" something like a preflight
though looking at it now, it seems like there's definitely some code work to be done to make this thing useful
playing with it now though, I can see the vision
Enforcement of things has to be done through validators on perforce/swarm levels (I.e check if description has “#preflight” etc… (otherwise you could just open P4V and submit directly) but yes, we’ve got submit tool fully up and running (excluding Fortnite specific things like integration requests) so I might be able to help… but our configuration is quite rough around the edges since there’s pretty much 0 documentation anywhere as to real usage, the example config is half wrong etc.
yeah, as it is my team is small enough that I'd actually prefer P4 itself not enforce anything for the time being, but having the submittool just do it at a surface level to get people in the habit (but large enough to warrant using these in the first place)
currently trying to get horde integration working with it, do you have a sample param file with horde integration?
been digging through horde's endpoints to figure out what it wants for some of these
I’ll send you some example config and some details when I get to my computer in about an hour or so (it’s 6:50 am here) 🙂
super appreciated
We are also small team (6 people) but enforcing going through submit tool (I.e content validation + code preflights ) cut down on tooon of random issues creeping up.
glad to see you're still helping out on here btw, i disappeared for a while myself so i was kinda hoping you'd still be around
not exactly a lot of us using these tools lmao
at least in small scale scenarios
I like to solve puzzles, so figuring out these kinds of tools, sometimes years before they’re officially unveiled… is… fun for me.
it's like being a sysadmin but in the context of UE
triggers the same neurons for me as getting a complex app running on a linux vm or somethin'
so... I'm at the PC... let's start with some common things about submit tool:
- Epic's internal deployment is driven through UGS (i.e. it's stored in horde or on perforce as a ugs tool)
- There are generally two locations for storing config:
Engine/Programs/SubmitTool/Config/SubmitTool.iniand{ProjectRoot}/Config/SubmitTool.ini- the engine location is baked into the submit tool during build process the project location is read at runtime and inferred from the files you are trying to submit - We use engine level config for global configuration (such as reflight etc...) and project level for... well... project specific things
now... here are the configs:
Engine level SubmitTool.ini
and Project level config:
[Validator.MatchoContentValidator]
Type="CustomValidator"
IsRequired="true"
bLaunchHidden="true"
bLaunchReallyHidden="false"
CustomName="Content Validator"
bAcceptDeletedFiles="true"
bTreatWarningsAsErrors="true"
IncludeFilesWithExtension=(".uasset", ".umap", ".uplugin")
ExecutableCandidates=(\
("Editor Config: Development", "$(root)/Engine/Binaries/Win64/UnrealEditor.exe"),\
("Editor Config: DebugGame", "$(root)/Engine/Binaries/Win64/UnrealEditor-Win64-DebugGame.exe"),\
("Editor Config: Debug", "$(root)/Engine/Binaries/Win64/UnrealEditor-Win64-Debug.exe")\
)
bUseLatestExecutable="true"
ExecutableArguments="Matcho -Run=ContentValidation -P4Changelist=$(CL) -p4client=$(CLIENT) -abslog=$(SubmitToolLogsDir)/EditorValidation.log -unattended -traceautostart=0 -fastexit -ini:EditorPerProjectUserSettings:[/Script/LiveCoding.LiveCodingSettings]:bEnabled=false"
IncludeFilesInDirectory="$(root)/Matcho"
ChangelistDescriptionAddendum="#changelist validated"
bSkipWhenAddendumInDescription="true"
EnableOutputErrorsAnchor="Submit Tool Anchor - any error after this line shall be considered and cause error."
DisableOutputErrorsAnchor="Submit Tool Anchor - any error after this line shall be ignored."
UIGroup="Content Validations"
AdditionalValidationErrorMessages=("This validation runs UnrealEditor, please make sure you have a working non-crashing editor and, if you build your own, you have the right configuration selected in the validator options")
ExecutionBlockGroups=("Editor")
TaskArea="LocalFiles"
[SubmitTool.Horde]
; Use extended tests if pushing into the game
Definitions=((RegexPath="^$(StreamRoot)\/Matcho\/.*$",Template="matcho-presubmit-tests"))
In the configs above there's example of pretty much every feature submit tool has other than built-in auto-updates since we're using UGS for that as we don't need high-frequency auto-updates - and asset virtualization, since on this project we're not using virtualized assets
Also also... some things might not work in regular 5.5 since we're running slightly customized version of Submit tool that's closer to the upcoming 5.6 release... but at the end it's a decent reference source
One more thing: https://github.com/klukule/SubmitToolLauncher here is editor plugin of mine which makes it so that whenever you try submit from within unreal editor (both through submit changes and list changes windows) it instead invokes submit tool
I still need to push the "refresh source control status after submit tool closes" feature I forgot to push 4 months ago 😄
here is a reference buildgraph I made some time ago - not sure if it's still working these days
And here's few additional files to put into Engine/Programs/SubmitTool/Build/Win64 if you want to use it as UGS tool (UGS can't directly execute ps1 files, so I had to jump through the hoops of calling powershell from bat files - it's not really reliable - but the original bat file used by epic is calling for epic internal tool "P4vCustomToolInstaller.exe" that's not available to the public... and I've been too lazy to rebuild that tool although it would be only couple of lines of code
the ps1 file is available on ue5 main (or 5.6) branches, so here's a link: https://github.com/EpicGames/UnrealEngine/blob/ue5-main/Engine/Programs/SubmitTool/Build/Win64/InstallSubmitTool.ps1
@south flint hope this helps 🙂
iirc one thing that we had to do in UBT is to completely disable AutoRTFM since under certain conditions (mostly if you try submit engine code) it would immediately fail any static analysis or non-unity compilation because it would find the AutoRTFM tests in the Engine/Source/Programs and die on not being able to find AutoRTFM executables... but as long as you stick to just pushing game code you won't run into that issue
and if you do, either patch UBT or remove AutoRTMPEngineTests and AutoRTFM Tests programs
The "patch" for me was to skip rules validation for modules requiring AutoRTFM compiler by doing this little tweak
appreciated! will look through this in the morning
well, it is the morning for me already, but later in the morning
lmao
anyone setup UGS where you can have multiple projects under the same stream
we have 2 games in progress
but we dont want to have 2 copies of the engine + game
but we still want the UGS seperation
Yeah, I do that with our R&D sandbox. I think you just do everything normally from P4 because in UGS you select a uproject file anyway so you'd have multiple tabs, one for each project.
I'm not 100% sure that it tracks syncs to shared content like the engine or plugins correctly, but it should be fine for the project specific stuff.
but it's been a little while since I set that up or done any work in that stream
the project selection in UGS is mostly so that UGS knows what to sync (since there are the sync filters) and to know what it can launch
otherwise it will show all the commits that happened in the stream since that's the root of your workspace
you can have multiple PCB sets in the ini config or in Horde for every project, but on any code change you'll have to build all the possible PCBs iirc.
and you can also separate the badges per project by providing the "UgsProject" attribute on the Label inside buildgraph
That does sound like what I might have been seeing. I don't have it in front of me at the moment.
so you can have separate CI badges for every project so badges don't melt together for different projects
$ git commit -a
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Git reminds me of Mcafee antivirus in the 90s, it always does maintenance at the worst possible time.
Anyone got experience with using Git Hub with a project and how you would exclude assets etc that isn't being used at all to save it pushing uneeded stuff like marketplace assets etc that have been added to the project
this guide in the pins seems like a good overview https://miltoncandelero.github.io/unreal-git
so just looking at this but apparently it's not that much at all even if GitHub started charging for the host thingy
The real money is the LFS charges!
so looking up on this I'm not sure what to use now haha, it seems which ever way I look at it there would be additional cost
u shouldn't use github for UE projects.
any other suggestions ??
cause so far it seems anything else I have to handle the hosting myself
perforce or git(git hosted through azure or another provider that isn't github)
git on azure devops provides free hosting with up to 300GB of free storage per project
hmm and how difficult is it to setup just git and not github ?
bout the same, theres a full step by step guide available for setting it up
azure devops lets up go up to 250gb i think, beyond is self-hosted
so in that post you've linked their using GitHub deskpt
*desktop
is that not using github which is not the best thing to do ??
oh okay so yeah reading into it a bit more I see
so I can still use Github desktop which is good
for the host would everyone say that azure one is prob the best option for me where it will either cost 0 or very little per month ?
azure is the cheapest(free)
whether its the best probably depends on ur preferences and such, i generally prefer perforce over git to begin with but then you have to pay for hosting, or host it yourself on a local machine.
i find gh desktop client is kinda bad, too tuned for github service use
^that too, its generally better to use a different client, but it will work.
🐢
I'll prob stick with that guide the person has made, it's prob gonna be okay for now
and if it's purly just the client which is seperate to the host then i spose down the line the client prob can be changed with not much issue
thats fine, and switching the front end client is something you can always still easily do at a later date without risking ur data
and no matter what you go with, having source control is infinitely better than not having it regardless of what you choose
so from what I can see if I do this option I'm going with i can't do what you can do with Github can I were I have a local version of the project and then anther version which is the kind of version that everything is pushed too
bassically meaning anyone working on it works on their local version then pushed the changes to a main version which is the one with the latest changes etc
yeah it seems it's trying to add all the marketplace asset stuff
yeah so issue I have here is git wants to literally take everything and commit it which i dont want cause most of that marketplace stuff I'm not actually using yet so would be a waste to add them to git
git does not care marketplace things or not, any file within folder is a possible target of versioning
it is just a tool to version files
same git does not care referenced or not - it is just a file
you control what you add and commit, with a git gui client
so I'm currently thinking of taking the assets used migrating them to another folder which I can obvs mark for adding and then get git to ignore all the marketplace added folders
so i'm confues here as on that guide that was shared to me they go through setting up the github desktop bit and commiting changes and pushing them to the repo. they yhen touch on LFS but I'm confused if I need to use it now or not
I'm thinking of using that azure devs thingy so would I still require LFS or is it at this point things diverge because I'm gonna use a different host then Git
do we have any update on that guide that I was linked to for collaberating with others bit
it's the Azure Ops collaberators bit
what do people generally do to review/resolve .uasset conflicts during merges/rebases? is there a preferred source control tool for it?
when I commit changes and Push or Pull should Rider IDE be closed ??
I know the editor needs to but not sure on the DIE
*IDE
So when it comes to source control and collaborating with others, how would this work. Do you have branches from you main so say v1.0, v1.2 etc
And then people merge their branch with the latest version or would people just take it to Main branch on the repo is the one that is always the latest version ?
you shouldnt have any uasset conflicts if you are using source control correctly.
uassets are binary files and should always be exclusively locked outt by one person a a time.
azure is your host, git is your source control software, github deskop is your git client
Everything you are doing currently should follow the guide exactly as you are using the exact same as the person who made the guide
why would the editor need to be closed when u are pushing changes to your source control?
if you are pulling changes sure, you'll want to close them but for pushing no.
for developing in UE you generally only want to have 1 mainline branch, as you cannot (easily) merge binary files down the line.
Hello, I'm a bit stuck figuring out how to set things up that the Engine source and multiple projects can share the same stream depot and workspace.
Is it best to give the Engine and each project its own mainline stream? And how should I set the mainline stream to only include part of the workspace files?
How to keep their changelists separate? Does each mainline or stream need to have its own workspace?
Could anyone share an example of a stream graph and its stream specifications with me? Thank you very much!
This is basically the setup I done at work. I'm migrating my home perforce to be closer to this, but not exactly.
You got a bunch of utility/shared stream "families" along the top and then three different mainline streams that import those utility streams along the bottom.
The skunkworks mainline has multiple projects in the mainline while the other two are mainlines for only those projects.
How should I allocate workspaces for these streams? Do I need to set the Paths/Remapped/Ignored settings for the streams?
You'll want a workspace for each mainline project stream (worst case). Those streams will import the others in the Paths settings.
At a reasonably large studio with multiple simultaneous projects, you may only have one workspace for the project you're on and you'd only swap it if you move projects.
Or you might have one workspace if all your projects use the same copy of the engine like the Skunkworks mainline does in my example. (this is how I'm setup at home)
But how would you maintain versions of say builds that are stable and for release compared to the builds that may be in development and are for say the future release builds ??
That's okay because that's not really a "working" branch. It's more of a snapshot that you copy from main. That way there are no conflicts.
And any minor changes you make directly in that branch are intended to be wiped out if you have to copy the same thing from main again (maybe even a more comprehensive fix for the hack you did directly in the release branch)
So i should have my main then a branch for release builds, and then obvs I would have my own local branch where I would test etc my stuff I'm working on and adding
The main build I'm guessing serves also as the dev branch so the one everything goes to before going to release branch
Generally unreal dev doesn't do local branches because then you do have conflict issues trying to merge changes from your branch and my branch. Instead we work in the same branch and use file locks so that we both can't edit the same file at the same time (but only for binary files, mergable files like code can be edited in parallel).
So I'm prob gonna do it where the main branch isn't touched or worked from, and instead I say have a branch which is the main but my own branch that way if I mess something up big the main branch is protected as its only my branch that'll get affected by the issues
Other reason I don't feel like doing the lock file thing is it might cause more issues then actually help so
file locking is the primary benefit of perforce (if we ignore the performance benefits over git etc.)
- I highly recommend sticking to trunk based development as that's what unreal is pretty much built for
So, just to make sure I've got this right, I should create a separate mainline and workspace for the Engine Source, and then merge and build within its sub-streams. Following that, for each project, I'd create its own mainline and workspace, and then import the built Engine binaries into the project's workspace using paths -> import view_path [depot_path].
Am I understanding that correctly? If you don't mind sharing, could you perhaps give me an idea of how your streams are set up?
And is it generally recommended to keep the Engine Source and each project in separate Depots?
why? if u mess something up big you can just roll back to the last functional version, which would be the same as ur stable branch, and then start working from there again.
in UE u should really use file locking you are basically guaranteed to run into conflicts otherwise if there are multiple people working on a project or you work on the same project from multiple systems.
So they will work from it on their own system on their own project
You don’t need a workspace for the engine source. You also only need to build from the project stream. You don’t necessarily have to build from the Engine stream.
You would import the Engine source in to the project streams.
How you want to organize the depots is up to you. At work the projects get their own depots but I don’t bother with that at home. It has some minor effects on the streams because you can have child streams in different depots (and the engine stream for a project would be in the same depot as the project mainline, not the other engine streams).
I can share later when I’m back at my computer, but it’s really not that interesting.
So if i do the locking files method it'll mean slow progress quite a bit cause me and this other person is like 90% is me and 10% is them so most of that'll be done will be from myself mostly
why would that slow down things alot? the engine handles 95% of it for you u just cant both work on the exact same binary assets at the same time. this is done in studios with hundreds of devs collaborating on a single project.
and you wouldnt want to anyways because if you would work on the same assets.... you wouldnt be able to merge the changes, so you'd have to pick whose changes you want to keep and the other persons work would be destroyed and you'd have to re-do it.
now THAT would cost alot of extra time.
I get the reason why merging isn't good idea but I think for the fact I'm gonna be 90% doing the most of the work I'll prob just do it where I merge into the main branch after I have a working build after I finish working on a feature
And I'll just manage the merging of the other person's stuff when they push stuff to main branch from their branch which as I say will be really small amount of time
You say that now, but we’re all terrible at predicting the future.
Don’t say we didn’t warn you.
May I ask if every project takes up disk space equivalent to two engine builds? For example, if a project uses a dedicated engine version and then its project stream imports files from the engine stream.
Thing is I've been part of another project where it's worked quite well in terms of how I'm gonna do it
Plus of i do it the way of locking put files and I'm testing stuff which uses various files no one else can touch them then and well could mean it's more headache then just merging
Also I don't fancy them locking out files doing stuff and then full breaking whole project and I then also can't progress with the thing I'm working on etc
Hello, what are the best practices for working with the Engine Source in Perforce, and which workflow should be followed?
What's the proper way to bring the Engine Source from a Git repo into a Perforce depot? Should the commit/changelist history be kept?
I'd like to be able to make some local changes, keep pulling updates from upstream commits. And once the project locks to a specific engine version, I can still cherry-pick selected upstream changes if needed.
Hi @arctic hornet
Hey, I’m currently out if town, so I’ll make it quick (more details later):
- trunk based development
- engine stream, merge stream and game stream
- sync from git, run setup.bat, push everything other than .git folder to engine stream, merge with game in the merge stream (resolve merge conflicts) and then merge to game
If you dig through history here you’ll find ton of information… what I’m “preaching” is the “Epic Way” of how epic does it as it worked for us for about 8 years now, but it might not suite all people/development styles, other people here have alternative ways of doing things, so I highly recommend giving it a read as well
I'd love to learn the Epic way, but there are a lot of things I cann't figure out.
For example, how exactly are Streams and Workspaces set up in this structure? Are the workspace paths for Engine, Project A, and Project Z all pointing to the same path, like C:\Workspace Root?
you still seem to believe you CAN merge though, which is false, u're going to have to choose 1 persons work over that of another.
Not from what I believe merge does
From my understanding merge will pull together all the changes so you'd just accept one pull request which would be one merge
what you believe works on code, where you can combine multiple lines of code from different people, on assets within UE like blueprints, umaps, uassets and most other files you work with in UE they are binary, and can in almost all cases not be merged automatically.
But I wouldn't be merging all at once
well, you do you, its your project. #YouHaveBeenWarned
I just don't see the file locking working out
This other person is not active at all so I dread to think they do something mess up project in a big way and then have to try getting them to sort there issue
the majority of the industry ranging from large triple A studios to single person indie devs disagree with you.
Bit what if you testing out stuff like a new feature and your jumping in and out of files all over the place ?
Wouldn't that cause issues for other trying to get their tasks etc done
Actually I've just thought i can still do file locking
I can do both, I can still have my own branch and just update it with the main branch when ever that gets a change, and test etc my stuff on my branch
And when it works and everything switch to main branch and check out the files I work on to implement it. Technically that's a way it can be done.
So from what I've read it's going to be a right ball ache to get file locking working due to azure not supporting it.
So turns out azure devs lacks server side support for file locking so after all the convo i wouldn't be able to do file locking anyway
(I'm still not at home until tomorrow evening - so roughly 36 hours... so my guding capability is slightly diminished) buuut... let's get you the basics... what you see on theimage you sent is a single workspace containing engine and one or more projects, here is how it looks like... I have a sandbox project and main "Titan" project together with the engine... for example
The three major branches are:
//UE5/Mainwhich is the clean engine ingest from github/UDN//Titan/Dev-EngineMergewhich is used to marge the new versions from//UE5/Mainand//Titan/Main//Titan/Mainwhich is used for main development, everyone generally works in that stream
other depots and things are just additional things like UGS binaries, virtual asset payloads, horde stuff, atuosdk etc. etc.
my usual process when creating new perforce server is:
- setup protections
- setup typemap
- Create UE5 and ProjectName depot
- Create mainline stream in UE5 and ProjectName
- Create development stream in ProjectName
Dev-EngineMerge
Initial filling/updating engine:
- Create workspace for UE5 mainline in some folder if you don't have it already (you never work in this workspace)
- Clone from github to the same folder, run Setup.bat to get binary dependencies
- Mark everything for add except the .git folder (or reconcile in case you're upgrading - reconcile will take a loooong time so I recommend doing it in smaller chunks)
- push everything to the server
- If upgrading, merge the ProjectName mainline the to Dev-EngineMerge
- Merge UE5 mainline to Dev-EngineMerge and resolve conflicts
- Merge Dev-EngineMerge into ProjectName mainline
- On initial creation push your game project excluding the usual thins like Binaries, Saved and Intermediates
You then do your day to day work in the ProjectName mainline, you can now use things like UGS and Horde to make your life easier since your server follows all the things epic's tooling expects
If there is anything else you'd like to know, just ping me and I'll get to you when I have some time
The Editor provides an option to make files writable instead of checking them out if you only want to do tests or someone else’s has the files.
Huge teams use perforce and file locks on blueprints and are able to build games just fine. It adds a little more developer communication, that’s all.
Thing is them teams would be using hosting that provides server side support
So they'd have file locking abilities
(most large teams even set up "cross branch locking" which is a feature of unreal editor specifically for perforce where unreal checks across all the streams/branches if someone has the file locked to avoid even more collisions)
Azure doesn't have any of that
azure devops has LFS, file locking is inherent part of LFS
So this is likely at most 2 person team
file locking is useful for any team of size greater than 1
trust me, after 10 years of unreal development I wouldn't work withut file locking (nor would I work with git tbh)
How would I lock files in that case would I simply switch to main branch in githud desktop and check out the file before working on it ?
I'm not sure how it works with git, as I've never used git with unreal projects, so that's a question for someone that knows more than I do
I specialize in perforce as it's defacto industry standard in game development
Well I'm only using git hub desktop client
It's connected remote to azure devs op thing
Yeah only thing with perforce is it can start to cost when project grows and grows
git = protocol
github = service provider
azure devops = service provider
github desktop client = a git client
as long as your team is up to 5 people (or 20 with account sharing) perforce itself is fully free
you only pay for the storage and hosting costs as you have to host it yourself
but for unreal projects hosting your own VPS with perforce can be cheaper than LFS costs in most cases
How much is that though cause as minute I'm using azure which gives a fair amount free until you are charged
Also I wouldn't be hosting myself
No way am I leaving my pc on 247 haha
No not really. On your working computer you only have the one copy of the engine source for the project, the stream that’s imported. If you have multiple projects with dedicated engine streams that you’re sync’d to it’ll take up more disk space.
On the server side, perforce is pretty good about reducing duplication, so if you have no engine changes you’ll basically have the pristine version you checked in and some light weight data pointing back at that in each of the other streams.
azure devops is the only exception to the LFS rule as they provide decent free package, others just charge you arm and a leg, but hosting perforce server depends on the provider you choose... there are providers that are relatively cheap like OVH where you can easily get decent enough machine for like 30 USD a month
and by "self-hosting" I meant you are managing your server etc... i.e. perforce isn't a service (like github or azure devops) but you host it on some machine etc.
Yeah not sure i have time managing it and 30 usd a month is a fair bit espically for well how small the project is and if honest for how much that other person will actually work on it
Out of interest if git is the protocol etc and I use console to lock files wouldn't that be same affect as locking them like perforce etc would do ?
Obvs I'd lock the file in the main branch of the report
Repo
in serious/semi-serious scenarios where you're making a game a goal rather than for fun 30 USD is nothing in the grand scheme of things, even in indie sphere as a hobby... but obviously if it's some toy project without specific goal then it would be considered waste of money I guess
I’m aware. I just don’t trust it because it’s through the Editor and not the source control client. Which means you can still check it out if you’re working directly in p4.
When I’m doing engine merges (since those are one of the few branch work cases) I just check the file out in mainline as well. I’m happy to revert it for anyone that needs to make changes, but at least then I can keep track of the file I need to recopy and refix.
yeah, as always it's more of a convenience tool to give artist quick "hey, watch out, you might do something that results in conflict" rather than hard stop
You could fully mandate this flow by using "pre-command" triggers which would check across branches and reject the lock command for example
but I've never seen anyone do that in reality, as it can limit what you can do...
so just having a warning in unreal is better than nothing
So if I went for performed hosted option for a team of 2 what would you could be the most cost involved ??
Thanks so much! I actually have a few more questions:
- If
Engine,Project A, andProject Zall use the//ProjectName/Mainstream and the same workspace, won't their changelists get mixed together? Should I keep them separate? - When cloning the source from GitHub into the
//UE5/Mainworkspace, is it done directly via the Git command-line or GitHub Desktop? Would engine source commits/changelists from GitHub not show up in the//UE5/Mainstream? - Once a project is locked to a specific engine version, if I need to merge a particular upstream commit/CL, is the workflow to fork, branch, merge in Git, and then reconcile in Perforce?
- If an alternative approach is taken, such as placing the Engine and each project in different Depots and workspaces, could this potentially create difficulties (or even make it impossible) in integrating tools like UGS, Horde, and RoboMerge later on, because they expect the "epic way" Depot and workspace structure?
It's also worth mentioning that you can use file contention as a system design "smell". If too many people are trying to edit the same blueprint to do their work, it's possible that blueprint does too many things. So you can sometimes "fix" contention issues by small refactors.
So this is a good point, let's say I'm making something a feature etc but I don't want to affect my main development branch as that is currently stable.
Would it be realistic to create a off shoot from the latest dev branch for me to develop the feature before adding it in to the dev build
Obvs perforce terms here
Not fully there on its termalogy yet haha
- Yes-ish. It depends on your priorities a little. Our R&D projects are all in a single stream and we use virtual streams to allow people to only sync the specific projects they are working with. However our shipping projects have streams that are only for that project.
- You don't usually clone github into perforce. You take the repository that you've sync'd (or the zip that you've downloaded), run setup.bat and then commit everything to perforce. You do not have the detailed git history in the perforce history of the engine.
- For cherrypicking changes, I just look at the diff in git and replicate those changes manually in perforce. There is no "our" version of the engine in git. For hotfixes I'll grab latest, do a reconcile on the versioned stream and then merge changes through the series of engine streams from my earlier image. For minor version updates (5.X -> 5.Y), I grab latest, run setup.bat, commit that to a new versioned directory. I copy that to the Engine.Latest stream and then merge through Engine.Midsummer to Project.Staging to Project.Engine.
- Those tools use the workspace and don't care about streams. RoboMerge sort of does, but it's just a utility for doing stream to stream merges, it doesn't care what's in the streams. Could be just engine or just project or both. We use UGS & Horde with the stream setup from my earlier picture and they don't have any problems.
Maybe. Depends on the feature. If you're also making changes to the existing content to hook it up at the same time you may produce conflicts (unless you're only going to be changing code, but you probably don't know that upfront).
All the game development I've done (20yrs, unreal and custom engines) has been trunk based dev without feature branches. Some of this is the reliance on binary data at some point in the pipeline that can't be merged. Another is making sure that everyone is using & contributing to main regularly and aren't working in a bubble universe (their branch) that becomes difficult to merge when they're done with work.
When I'm doing engine upgrades in a separate branch, I very consciously do a merge from main every morning. It's easy to forget to do this or think you don't need to.
Check out Modern Software Engineering on youtube (used to be Continuous Delivery). Dave has lots of good videos on the benefits of trunk based development. It's just slightly more helpful to games because branches can cause actual workflow issues.
I'll pretty much echo what Ramius has said...
- in "Epic Way" you have one depot per large project, let's say Fortnite which lives in
//Fortnite/...or Unreal Tournament which lives in//UT/...and if you have some companion projects like test cases, sandboxes and whatnot (or in epic case the example projects) those live alongside the master project... but you usually don't have two major projects in one depot - you can, nothing is stopping you, but epic doesn't do that. - You sync in bulk to specific unreal version, there are obscure ways to do it commit-by-commit but that's really not efficient, since you usually don't care about partial changes as you usually take specific version and ingest it all at once
- if you need to marge something specific then you usually just modify it directly in your project mainline (
//ProjectName/Main) and you keep your ingest clean for whole engine versions etc. and in general it's done manually or using git patches... you checkout necessary files, you change them, you compile and test, you push.... once new version of unreal comes potentially you just do the usual round trip of Ingest + Main -> Dev-EngineMerge -> Main ... - there are ways to use shared engine by using virtual streams, or importing different depots etc... though again that's not the "Epic Way" and while it can help with sharing changes and lowering server disk usage, it also has it's own drawbacks... you can't really lock specific project to specific version without freezing the import to specific revision or branching the engine etc...
obviously as I've said before the "Epic Way" is just how epic does their things, it might not suit everyone and many people do some hybrid approach that suits their needs etc. I just find the "Epic Way" to "Just Work (tm)"
since everything neatly fits together, most example scripts work without changes etc. etc.
The only requirement so most epic made tools work are:
- Use Perforce
- Have engine and project in the same stream in one way shape or form (as shown on the screenshots etc. either directly or through imports etc.)
the rest is just random stuff that I've gathered over the years (or epic published) of how epic does their thing
I don't think they care that they're in the same stream, only that they're on disk in a specific relationship.
You can produce that through a variety of stream & workspace setups (maybe I'm being overlay pedantic though)
I've never seen Epic's stream setup, but Riot had a pretty good talk for supporting multiple projects and they definitely had separate streams
(and then you go and edit it, darn you klukule!)
😄 sorry not sorry 😉
This is what I know about epic's structure:
- One major project per stream
- "Main" is the mainline
- "Release-XXX" are release branches
- "Dev-XXX" are long term development branches
- "Dev-EngineMerge" is/was used for merging the engine into the specific project (these days iirc epic mostly works on fortnite and they just use robomerge to replicate changes in "realtime)
I know few other things, but those are pretty much irrelevant to the structure so there's no point in mentioning those
So my only thinking with branches or the perforce equivilant not sure what that would be is for pure purpose of you do your stuff first isolated from dev build. Providing your stuff checks out and works you can push and merge with the dev build
And then only when a certain point is hit would the dev build be pushed and merged with release build to basically be the main latest stable build which kind sits idle
But allows if something break say the dev is merged with release vuidk and something breaks the release can be rolled reverted to before the merge was done
So no one is saying no branches, just not feature branches. Releases still have their own branches and you want those to be stable. But the trunk doesn't need to be as stable. The ue5-main stream often times has compile errors, but the release streams always work.
If someone commits a change that has a compile error, they fix it as soon as possible. If they cause a crash, you triage the crash. Maybe they need to fix it now (editor/game won't boot) or maybe it just goes in the backlog (you have to do 6 complicated things to maybe cause the crash). Of course it helps to have automated processes to verify this stuff. But you should have those regardless of your branching workflows. You can also easily revert specific check-ins if the fix might take too long or the author is unavailable (because they didn't wait for the build verification before leaving or something)
You shouldn't be working in isolation from the build for too long and should be able to break up your work to be able to submit incremental changes at least once a day or couple of days. But you also sync & merge at the start of every work day so that you have the same version (mostly) every one else is working with.
If you really need them, feature flags are still an option to make code paths optional or to A/B compare across two implementations.
It also makes it possible for Design to start evaluating features when they're partially complete (which can be helpful) or for other programmers to evaluate code without having to deal with other branches.
Hi, I might be missing something, so please bear with me.
Let's say there are ProjectA and ProjectB, each with their own engine versions, EngineA and EngineB.
There would be a mainline stream Main_EnginePristine with two child dev streams Dev_EngineA and Dev_EngineB, all sharing the same workspace Workspace_Engine. Then there would be two additional mainline streams Main_ProjectA and Main_ProjectB, each with its own workspace: Workspace_ProjectA and Workspace_ProjectB.
So on my working computer, would I end up with three separate engine builds: one in Workspace_Engine, one in Workspace_ProjectA, and one in Workspace_ProjectB?
Because after I build the engine binaries in Workspace_Engine and then have Main_ProjectA/Main_ProjectB import the engines from Dev_EngineA/Dev_EngineB, each project workspace end up copying its own copy of the engine build files?
Does "hotfixes" refer to "5.X.X -> 5.X.Y"?
I greatly appreciate your insights, they have really resolved my confusion!
Thanks for your extra explanation, especially this line
“I just find the ‘Epic Way’ to ‘Just Work (tm)’ :kek: since everything neatly fits together, most example scripts work without changes etc. etc.”
You might’ve said it casually, but it makes a lot of sense. Epic team has been refining Epic Way to a very high level, and using it makes it easy to get to all the scripts and tools Epic puts out. There's really no reason not to use it and get all those benefits. It really sold me!
Oh yeah sorry when I say branches for features I mean just like a branch that is the snapshot of the dev build before the feature began its work.
I was thinking that way if whilst working on the feature something breaks it's away from the dev build and obvs if the feature or task is completed and things still work that branch that was made would prob be removed or closed
Not good at explaining this source control stuff etc
Normally I've never used or had source control in my projects so this is a new kettle of fish as it were
Unreal is not really built for this kind of development, it's generally easier to just work in mainline branch which is generally considered unstable... if there's an issue, just revert the change and done.
if you want to work on stable release, let's say 1.0 you just make new branch/stream/whatever which is the "Release-1.0" for example and that one is considered stable, polishing and fixups are done there and potentially merged back to less stable mainline
Thays what i mean sorey
The main would be the dev branch, then there would be a branch for release which would get a merge each time a release build is done
the only time you make separate branch is for development is in case you're doing some major, long term thing like let's say "complete rewrite of movement system" which would take a long time and the branch would be constantly broken, at that point you make the branch, iterate on it and merge back and forth every so often (epic internally uses robomerge for this purpose to keep the dev branch in sync which avoids hassle during final merge)
That's what I mean the branch I'd make from the main would be say if its something I'm adding so a new thing feature etc
those are called "feature branches" and those are not really recommended
Robomerge
as there is tooon of hassle during merging
Yeah so ignore word feature i just mean a branch
99% of the development goes on the main branch
and you promote to more stable branches for release
I'm most likely using feature word wrong
that's the simplest solution...
either way, I've got a meeting to attend in 5 minutes, so I gotta go, good luck
Yes
Imports happen in perforce and not on disk. You import the source, not the binaries. You don’t even have to build from the engine stream. I have a “floating” workspace that I point at the engine when I’m doing an upgrade and that’s it. I submit to the engine streams and then am done with that stream. You can even delete the source from your disk at that point if you want.
In fact I reuse that floating workspace to upgrade plugins as well.
@pastel blade oops lost the reply state
Got it, the engine binaries get built inside Workspace_ProjectA and Workspace_ProjectB, so they won't show up twice in the Engine workspace. And the binaries cannot be imported unless it is pushed to the perforce server.
And we don't need to run Setup.bat when we update hotfixes, right?
You might be supposed to, I'm not sure. We rarely take hotfixes unless there's something specific impacting us. We tend to wait to take a new minor version until after a .1 or .2 hotfix though. But that's just's me.
If you don't run setup, be sure to revert the deletes that reconcile will "find" in the content directory or don't reconcile the whole engine folder. instead reconcile the folders inside individually.
any time you ingest new release of engine, be it minor version or a hotfix you need to run Setup.bat since binary files could change since last version and Setup.bat downloads them, it doesn't hurt to run it if the things did not change since it will just not download anything
but you have to run it before pushing to perforce rather than after merging etc... since that kind of binary assets needs to be present in perforce for it to work seamlessly with other tools like ugs, horde etc.
so apparently when i sign up for this Helix Team Hub thing it wants a buissness email address, can I not use my personal one or is that not possible with this Helix Team hub thing ?
what you want (if you want to use perforce) is the "P4" or Helix Core rather than Helix Team Hub
i thought I need the helix team hub for the hosting bit ?
cause that can handle the locking file thing etc
perforce and git are different.
so perforce is what I'm gonna use cause of the limitation with Git and Azure
TeamHub is perforce's offering for git... meanwhile Perforce (i.e. P4, i.e. Helix Core) is the thing you want 🙂
and regarding email, you can put bogus email there it's so business people can contact you if they want
so i don't need Helix TeamHub
ohhhh
so where would I get the P4 thing
I put Perforce P4 into google and this was the first response https://get.assembla.com/perforce-managed-hosting/?utm_source=google&utm_medium=PPC&utm_content=perforce&utm_campaign=perforce&utm_term=perforce&utm_campaign=Perforce&utm_source=adwords&utm_medium=ppc&hsa_acc=4619928215&hsa_cam=21845477717&hsa_grp=177161928900&hsa_ad=738587726571&hsa_src=g&hsa_tgt=kwd-343263924684&hsa_kw=perforce&hsa_mt=p&hsa_net=adwords&hsa_ver=3&gad_source=1&gad_campaignid=21983861511&gbraid=0AAAAADPRS_O6RELLOlA-cGpZ_DD4r7uPq&gclid=Cj0KCQjwoNzABhDbARIsALfY8VM-leW7QkGJaq1pJIFhHn3sl_MnV-T-n20qyqLsqFu5gDWfOUkHorIaAicfEALw_wcB
The #1 Managed Perforce Hosting Solution-Trusted by Enterprises. Assembla offers expertise in hosting Perforce Helix Core in the cloud, helping enterprises and teams reduce costs...
same page, different link 🙂
that's managed hosting if you don't want to host it yourself, you have to pay for every user and it's like 50 USD per user per month iirc
P4D
this is a bit confusing haha, I bassically want something that doesn't mean I don't need to host myself
https://www.youtube.com/watch?v=LITmtpuLrQQ&list=PLH3pq2J85xsMDY2AAkzUhTmHIg1S7WN1f
https://www.youtube.com/watch?v=jIQEjDiSe0g&list=PLH3pq2J85xsPYn71_yzzsZQKvalTW-duE
https://www.youtube.com/watch?v=4uuI5C5XNoQ&list=PLH3pq2J85xsPxgkoeCR28zokcrXM5Mzac
Here are three playlists that might help you get started
but it needs the ability for as discussed other day File Locking etc
well, if you don't want to host yourslef then the only option is assembla pretty much... otherwise by "self hosting" I mean get a VPS server from some provider like OVH and host there, not strictly your machine
is assembla the one you've just mentioned the one that costs a bit
yes, because if someone manages the thing for you, they want to be paid for it
if you want it for cheap, want file locking etc... then generally perforce is the best way, but you have to host it on your machine or a server... or pay providers such as assembla to host it for you
oh yeah I get that i just mean the cheapest host thingy
ovh is a service provider similar to aws etc, except generally cheaper.... there is not much else I can help you with as I'm quite busy and can't help you set up your server step by step sadly
if you want cheap server and want your perforce server to be in europe I can also recommend hetzner, their auction servers are quite cheap and can provide decent space to host even relatively large projects
but that's pretty much all I can help with
can i choose to host it later down the line if I wanted to ?
so for now I just set it up for self hosting
well, "self-hosting" doesn't necessarily mean to host on your machine but on a hardware you own or rent... but yes, you can install the P4D (server) on your machine and later just copy the files to some other provider and in most cases everything should just work if the servers are configured the same although going windows -> linux usually also entails setting bunch of permissions etc. but you can certainly solve it later
although installing p4d and p4v on the same machine is generally prohibited by the installer iirc... so that might be little harder and might need some magic
If you'd like to learn and try it out first, you can "self-host" it on your NAS/Homelab, or even your Windows machine.
i don't mind hosting it my self for now, it's just I'm not sure what I need at this point if I'm gonna do Perforce option as I thought it might have been okay but yeah
so im having a weird issue with perforce
in my Main engine branch (i have 3 streams Pristine -> Merge <-> Main
i updated UE5 in Pristine, copied to merge
then merged from main to merge
then copied back to Main
problem is some files never went to Main
(for example Build.version on main)
i see on Merge its a revision 3
but on Main its revision 1
this is on merge
but on Main i see just this
nvm think i fixed it
anyone used digital ocean at all ?
i'm following someones video to set it up but it seems there side works fine but that email i'm meant to get after creating the droplet hasn't come through even after waiting a few minutes
wait what? u got some documentation for this? thats my first time hearing of that
Not a documented feature (other than couple of mentions in some 2020 or whatever presentation from Ben Marsh) but I have an implementation I made about 5 years ago, it took and parsed robomerge configs and automatically set up the crossbranch things
oh great, love entirely undocumented vague features XD
Classic epic, pretty much internal thing
just want to check this but I can use my personal email to sign up for P4D can't I ??
reason I ask is I'm trying to do it where it's local for now just so I can get the version controler etc going
yup, you can
you can use bogus email, it's pretty much for marketing purposes
you'll get redirected to download page after submitting the form
https://youtu.be/p4RcDpGQ_tI?feature=shared&t=1823 here's the presentation about it
On an average day, Epic developers submit over 500 changes to Fortnite's mainline. In this talk, Lead Engineer Ben Marsh discusses Epic's development infrastructure and workflow including how we set up our branches, how we get builds of the editor to our artists and designers, how we set up our build system and escalate problems to devs, and how...
i love when u have to reinstall p4d, and then u have to enter ur contact info for the download, and then they'll reach out to you again like you didnt reject their previous identical offers xD
And here is the implementation I pieced together from multiple sources, but as it's been quite some time I don't really remember them anymore
+ it might need some tweaking to get it fully working, as I've said it's been quite some time
TY! i'll add it to my watch list
that's why I use apt install helix-p4d 😄
and those are going into my code vault xD tbf, i dont actually "need" the feature, but i am very curious how it works lol
there are two functions, one that fetches the robomerge config (QueryStateBranchConfig) and second one to set things up (RegisterStateBranches) which is the one described by Ben in the example from 2019 (mine is expanded to query robomerge unless configured from local sources)
the inbetween is just json file parsing
and dedupe etc.
it's a nifty thing to have in the project, it can just stay dormant until you really need it, that's why for me it lives in the unreal editor engine as TOSP is my framework from 5-6 years ago (that I should really update) which was used by all of my toy projects at that time 😄
so just wondering when I'm going through this setup of the helix core thingy and it wants me to add files can I tell it to ignore certain folder cause it's gonna try adding all the markeptet place stuff thats in my project as well
so it looks like I can remove certain folders after it scan through them but will I still need to do the above ??
also thats alot of files to copy is that right cause I feel its not
thats what it's wanting to copy all them folders
same way as in git, u need to set up an ignore file.
in git its gitignore, in perforce its p4ignore
so i've got Helix core thing installed and the P4V installed
currently following someones video on setting up perforce but the two videos I've watch they don't seem to do anything with the helix core thingy only the P4V
where do I set in P4V to tell it to adhere to the ignore file cause at moment the video I'm wathcing they've copied the project to a workspace location thats not where their project lives
anyone able to help cause I'm bit confused here, with this perforce method it seems the workspace that gets done is seperate to where the game stuff is and you copy the files over but my question is I now have this
my project
the perforce workspace
this means I now have two locations where my project lives and which one do I open etc
so reading up I can just have the workspace be where my game project files are
I shouldn't need to copy the files to another location
u should only have 1 place that hold ur project, which is within ur workspace. u can set ur workspace root to be anywhere you want though.
so this is what don't make sense to me, when I follow the guides they all tell me to but workspace root in default location but then to copy over the project files to that location
that will end up with having the project in two places
would I not just set the workspace to be where the project is
no u'd only keep the one in the workspace after submitting your files to source control
but u'd only want to submit them after setting up your p4ignore file
so I would copy over to the workspace location the project files
and then just leave the original ones dormant
so this is my workspace
just make this location the location where you already have ur project.
yeah so like I say the copying of the files to another location is a bit pointless
yes?
so i've setup my p4ignore file
so thats what I've ended up with
how would I know the p4ignore file is working though so ignoring those folder and stuff that I'll put in the p4ignore
love that so apprently the ignore file is ignored
so turns out the P4ignore file was set to ignore it self
It looks like there's a mistake in the document here
https://help.perforce.com/helix-core/server-apps/cmdref/current/Content/CmdRef/p4_stream.html#paths-field-stream
Is there a Discord server for perforce? To be more specific about Server Deployment Package?
I'm trying to get a Windows (master p4d server) + Linux (replica p4d server) setup running.
Hi all, is UnrealGameSync only meant to be used if you're building the engine from source yourself? Or does it work with Epic Launcher editors?
You need to be building from full source. No launcher based games.
Hi thanks for the reply. Just to confirm, after I download the source and run Setup.bat, GenerateProjectFiles.bat, build UnrealGameSync.sln, and build the installer for it. Do I need to submit all of that to Perforce? (It was around 66 GB after I did all that)
I'm not sure how to get UGS stood up. I haven't done that at either studio I've worked at with Unreal.
But for most of the source you want to submit in between running Setup.bat and GenerateProjectFiles.bat.
GenerateProjectFiles will compile and generate stuff that shouldn't be in source control so it's easier to submit in between those steps.
I'm just having a hard time getting past this error in particular.
So what you're saying Copy source to workspace, Submit, THEN run Setup/Generate
Mind if I ask how you handle binaries if you don't use UGS?
We're a studio of about 10 people, we tried using GitLFS initially and it was a pure pain in the ass,
so we're trying out perforce, the integration plugin seems to work a lot better, but we're still struggling with what to do the binaries. currently we're just submitting them to the repo (MyGame.dll), and everytime there's a code change, arists/designers have to close editor, sync/pull, reboot. we're trying to improve that workflow for them so there's less disruptions.
Run Setup, then submit, then run Generate.
I do use UGS, I just didn't set it up.
what does your directory structure look like on disk?
I just changed it to this, but I will probably recreate this in the steps you mentioned, right now that Engine contains the generated dependencies.
UnrealGameSync contains /Release/UGS Binaries genreated from building UGS
So this is supposed to be how it's laid out. I'm guessing Default.uprojectdirs in inside that Engine subdirectory.
If that's the case all those files should be up one directory and ActionRPG can stay where it is.
What should that "Engine" folder be? in this screenshot, is it the red box, or the greenbox (renamed to Engine)
I'm guessing the Green?
the Engine in my image is the red one, the one at the same level as Default.uprojectdirs.
So the directory with your uproject file should be in the same directory as the red one as well
This is the expected structure on perforce engine next to the project...
I'm struggling abit with how these folder map to Perforce workspaces. Is "Workspace Root" a single P4 workspace, so Engine and all the games under it is just a single workspace? That seems weird. Or is Each folder e.g. "Project A", "Project B" etc a separate workspace? in that case is the "Engine" itself also in a separate workspace?
nope (not separate workspaces), those are folders in a workspace (see the screenshot above for reference)
Well it depends. You can do multiple projects in one workspace. We do that at work for our R&D projects. But for "real" projects, they each have their own workspace, root and copy of the engine source.
What you want to do:
- clone from git
- run setup.bat
- Do not do anything else
- push to perforce
- add your project without binaries, intermediates or saved folders
- compile unrealgamesync (you don't want any stray files in your perforce)
- launch it, select a workspace (or create a new one)
- when you sync it will generate projects and build
here is practical example of what Ramius said, DevIteration is my sandbox project and it lives alongside the master project
Thanks for the reply. I will try that and see what happens.
I should also add, do not push the .git folder you don't really need it and it's only a bunch of garbage (and in the past I've seen unreal build tool sometimes be confused about the git and it was trying to run some hooks or whatever which obviously didn't really work - though that was in early UE 4 era... so it might've been fixed since)
so I downloaded the source code zip, and didn't get .git (though there is .gitignore). im assuming you only get .git if you clone the repo
in your "Push to perforce" step, am I pushing everything that was generated from the Build.bat step including everything in Engine/Binaries?
yep you get .git only when cloning
you need to unzip and only run Setup.bat nothing more nothing less, but yes you're pushing some binaries too (that's actually what gets downloaded during the Setup.bat step) but those are mostly things like assets, thirdparty dlls and supporting tooling... you should never push manually compiled binaries directly to perforce if you want to use UGS 🙂
p4v taking its sweet time adding all these files..
oh yeah, it will... it's like 300k files iirc
though reconciling after update is muuuuch longer (so for future reference, I recommend doing that in batches - i.e instead of reconciling whole Engine folder, you go in and do Binaries/Win64 then Binaries/DotNet etc.
when do you reconcile? (from my understanding reconcile is to tell perforce to check for any changes that have been made to files that it didnt know about, if it finds any it will add them as changes)
When doing an engine upgrade. Though you can setup your perforce in a way where you only need reconciles for hot fixes (5.X.Y -> 5.X.Z) and not minor version updates (5.X -> 5.Y).
Exactly, during engine updates, since those in basic most form go like this:
- nuke everything in engine folder
- copy over new version
- reconcile
- pray nothing breaks, go grab coffee, lunch and dinner while waiting
- push
(you usually merge custom engine changes and game code in separate depot/stream at a later stage, this is just to get clean engine version to perforce)
Anyone able to help with this
I'm trying to get my stream working on perforce cause up until now it seems I've not be doing it through a stream but directly with the depot
I'm trying to delete a workspace that seems to be set to the same stream as the other workspace and I think theres a conflict somewhere cause I don't think the streams are getting the right stuff
no files updated
1 warning reported
f:\UE_Projects\Projects\EchoContainment_Protoype\EchoContainment...#head - no such file(s).
seem to be getting above warning here an there
Anyone able to help cause I'm really confused on if Streams are working for me or not
@pulsar parcel sorry to ping you but thought ping over here cause this is source control channel, so the question is I have this
i have my streams and the workspace now I've noticed an issue where if I try merging the changes from Mainline down to development it wants to me create a new workspace
I can however set the workspace stream to be assigned to the stream mainline for instance and it'll let me work in the different streams however that green down arrow is always there
well you misspelt "development", but you usually work in main
trunk-based workflows are the norm with p4
thats what I get when trying to merge down
dev branches are seldom used except for long-running, disruptive work
so the mainline I'm reserving for working builds, not release builds but ones that are stable and when needed can be made into a release
the dev one is the one always being changed and altered and stuff
thats odd then cause the various videos I've watched on setting up perforce and using it with UE says to have them streams
minus the task and virtual ones
well the bible for setting up p4 is the top pin in this channel
and that dev one is the actively worked on, Mainline is the latest stable, and Release is the snapshot of the latest release 1.0 etc
main is a source of truth, not "stable"
awsome I'll look at that cause apparently epic uses the stream structure I have there from what I've been told from someone within epic or atleast a compnay using epics way of working source control wise
and I ain't going to be able to help you with a non-standard workflow
well the pin is directly from epic
and release streams are typically for stabilisation, and they have tools like robomerge to propagate changes to other streams
so you would submit in release-x.xx and that would automatically merge it into main for you
so they do have dev branches
for a specific purpose
which you decided to ignore
and I did mention that dev branches are also used for long-running, disruptive work
which an engine upgrade can be
oh yeah so I still need to sort this issue i'm having then when trying to merge down from mainline to dev for when I do distruptinve things which I don't want Main to be affected
I'm currently setting up UGS for work, but from following the Perforce "course" about it, it says that the game stream imports the UE5 stream. But that seems rather counterintuitive to me, since if we work on 2 games, I'd have 2 identical UE5 installed on the machine. This guide though, uses components to add the project to the UE5 stream instead. Which feels like it should be better?
depends on your way, some studios simply have engine directly in the stream instead of importing, since shared engine has it's own benefits but also certain negatives/caveats
we currently don't have a perforce license, so I'd like to limit our workspaces 😅 this is the main reason for me to want to have it shared
having engine directly with your project in the same stream is still 1 workspace
This is what I use on all the servers I manage (naming and structuring based on what epic themself use)
and here's the general "getting started" step by step for that... at the end of the day to save on workspaces you can always delete unneeded workspaces
so //UE5/Main is a clean engine without modifications, and //Titan/Main contains the whole engine with edits + project?
//UE5/Main is direct ingest from git without any changes, new engine versions go straight into there
//Titan/Main is the day-to-day development stream where game and engine lives (including customized changes etc.)
//Titan/Dev-EngineMerge as the name suggest is used for merging new engine versions from //UE5/Main together with //Titan/Main and resolving potential merge conflicts which can occur etc.
having one ingest stream helps with server-side storage etc. and generally makes it easier to track bugs since every version is new change and history is kept... meanwhile if you have per-release clean branches (let's say //UE5/Release-5.0 and later //UE5/Release-5.1 for example if you just switch a component, there's no record of it and you just swap the engine underneath the project, but if for example there's now some bug that happens after the engine update it's hard to track down what has changed etc.
and you can always merge from ingest stream at specific change instead of at latest... so you can still merge 5.1 at a later point even if the latest in ingest branch is 5.2 for example etc.
right, and in your case, if you have 2 projects, you'd have 1 workspace per project, with 2 unique copies of the engine right?
but if you need/want to have shared engine I recommend importing engine into project rather than the other way round
I was wondering if I could have an engine stream that imports 2 project streams to have a single workspace for both projects basically
yes, if they're major projects, let's say Fortnite and Unreal Tournament... I'd have //Fortnite and //UT with their own copy of the engine and two workspaces
but if I have testing/R&D project together with one major project I simply put them in the main project
like this, here's a Sandbox project and main project in one stream (and thus one workspace - UGS allows you to switch between these quite easily)
although nothing stops you from having two major projects in the same stream (and thus one workspace) it's just less convenient for naming purposes and if you're really working on multiple "major" projects you might as well get a perforce license, since you're probably not working on that amount of projects in less than 20 people
yeah we're looking for more financing, so we're not getting one just yet 😅 we are just 6 people though!
just two small projects
oh yeah, the annoying count (same as our studio) juuuust above the free license 🙃
yeah exactly
most people have 2-3 workspaces, my user is shared + has CI/CD things
so we're always really close to the limit
so yeah, for now even with 6 people * 2 projects you can still fit into 12 workspaces, it still gives you 8 workspaces to spare + CI/CD
yeah that's what you'd think, until some people have multiple PCs hahaha (not really an issue anymore though! but most of us used to have a work pc and home pc)
but you could for now designate one project as the dominant one, name the stream after it and keep the secondary one under it... and later if you get a license you can just merge it to the new stream and let it live there
and delete it from the previous location... you'll have whole history through integration etc.
oh that would be smart
iirc that's how fortnite started... it started in //Orion (codename for paragon) and was later spun out to separate thing when it became a product - epic had it this way simply because it was part of internal game jam
crazy to think that Fortnite came to be from an internal game jam
and... to think the game jam was around 2010 or 2011 iirc
soooo fortnite is almost as old as minecraft for example...
well, obviously that's not counting the fact that first public release was at a later date
//MainProject
/Engine (imported from /UE5/SomethingSomething stream)
/MainProjectName
MainProject.uproject
/SecondProject
SecondProject.uproject
yep, that would work
do you usually keep UGS in its own depot or as a stream in //UE5?
although "import" can be misleading, since "import" is a specific term in perforce ecosystem, for injecting content of one stream into another (before components were a thing)
I'm not really sure what's the difference, I've never really used components that much since they're not even enabled by default
share ...
share UE5/ProjectName/...
import+ UE5/... //UE5/Main/...
that's the way they say to set it up
well, I have buildgraph set up in horde that automatically builds UGS when it's changed, we build it from //ProjectName/Main branch in most cases... and these days we use Horde for storing the builds for precompiled binaries and even UGS itself
but on the old project of mine where we still used P4... it's stored like this
fetching precompiled binaries doesn't require separate workspace since UGS fetches it directly etc.
nor is it required for the updates themself iirc (although it might be used temporarily and later deleted, I don't really remember... it's been like 2 years since I touched this project)
yeah I noticed that, it's pretty cool
What I would do:
- Create depot
//UE5 - Create stream
Main - Upload build from git (clean fetch, only run Setup.bat and remove/ignore
.gitfolder) - Create depot
//MainProject - Create stream
Main - Create stream
Dev-EngineMerge - Integrate changes from
//UE5/Mainto//MainProject/Dev-EngineMerge - Copy changes from
//MainProject/Dev-EngineMergeto//MainProject/Main - Upload
MainProjecttoMainProjectfolder inside the//MainProject/Main(while excluding allBinaries,IntermediatesandSavedfolders you might already have locally) - Upload
SecondaryProjecttoSecondaryProjectfolder inside the//MainProject/Main(while excluding allBinaries,IntermediatesandSavedfolders you might already have locally)
later if you have more workspaces available and want to separte secondary project then just:
- Create depot
//SecondaryProject - Create stream
Dev-EngineMerge(this step is optional as you could create it later) - Create stream
Main - Create other auxiliary streams you might need
- Integrate from
//MainProject/Main/SecondaryProject/...(andEngine/...) either toDev-EngineMergeand then toMainor straight toMaindepending on your preference and workflows
thanks a lot!
i can't seem to mark for add my project files ??
I was able to do it for my p4ignore file but after submitting that and then trying to add project it won't let me
what does your p4ignore contain and show what you're doing
thats what it contains
# Build output
Binaries/
Build/
# Intermediate build files
Intermediate/
Saved/
DerivedDataCache/
# VSCode, Rider, CLion, or other IDEs
.vscode/
.idea/
*.sln
*.suo
*.user
*.userprefs
*.VC.db
*.VC.VC.opendb
# Mac specific
.DS_Store
# Windows specific
Thumbs.db
# Unreal Auto-generated files
*.opensdf
*.log
*.obj
*.pdb
*.idb
# Perforce metadata itself (optional)
.p4config
# specific folders to ignore
/Content/MarketplaceStuff/
/Content/StarterBundle/```
Build/ is a meme
i click that which contains the project
and I'm not sure why you would exclude mp stuff, but looks fine otherwise
but it doesn't seem to mark anything for add
I just took the example I can remove mp line
okay then show some actual files in the workspace view
like what does it show there
it won't mark anything to add if there's nothing to add
hmm strange it's marked stuff for adding now but I didn't really change anything so thats strange
you have stuff marked for add
in a pending changelist somewhere
.vsconfig should be ignored btw
thatd be auto generated file wouldn't it ?
yes it is
this is strange so altered the ignore file with that additional one you've just mentioned
I see this
in the log is this normally stuff is being added to the log here and I can't workout if it's because i've click add that many times I've kind of cause P4V to get confsued
*confused
probably because it needed to refresh
yeah i think i just pressed it so much it just got jammed with commands
restarting it seems to sort it
out of interest though after i'm done for the day working on my project and I submit the changes etc and stuff and then start next day on the project and the IDE isn't gonna constatnly want to process the files etc will it
Does the Use P4 Config checkbox not refer to a local .p4config file..? It seems to be using my systems perforce variables when I check that box (wrong workspace). Not sure if I'm doing something wrong or if that's the correct behavior. my .p4config.txt sits in the same directory as my .uproject.
huh?
is P4CONFIG set when you run p4 set?
It is set to .p4config.txt
it's looking for the config in the workspace root folder, and on windows it's looking for what's set in P4CONFIG variable as sswires has said
although on windows unreal generally looks for p4config.txt (without the . prefix)
although if it's overriden by the P4CONFIG variable it should use that
iirc you can generate the config file by running the UAT command P4WriteConfig or whatever it was
yeah, that works, it detects, writes and sets the config
you can also add -SetIgnore to make it set the value of P4IGNORE file
which finds any file *p4ignore* in the root and sets it as that, or uses the one from Engine/Extras/Perforce/p4ignore
Okay. My workspace root is C:/UE5Projects/Amor 5.3/. Running p4 set spits out the following. I've tried .p4config.txt as well. My .p4config.txt file sits at C:/UE5Projects/Amor 5.3/.p4config.txt. It reports (config 'noconfig') for both.
I suppose I'll give that a shot
the noconfig means it can't find the file in general
or sorry,... that it's not configured in the p4config file 
my bad
although documentation is conflicting on this
that the p4config is not configured in the p4config file..?
some pages say "the p4config file is not found" some are saying "variable not set in the config"
Because the files there
well, the main difference I see is .p4config.txt vs p4config.txt (without the dot)
it's configured to look for p4config.txt and your file is .p4config.txt
I've tried both but I interpreted this as it (perforce) assuming the . at the beginning, so I did not change the file name when I tried that one.
nope, it's looking for the file of exactly that name in the workspace root
Well that seemed to fix it!
you might need to restart your editor for it to fetch new environment variables
and afterwards might need to uncheck and re-check the checkbox for it to properly refresh
And just to clarify, the "Use P4 config" checkbox doesn't mean it's using the p4config.txt directly, rather it means "query P4 for the data instead of manually specifying them and loading them from cached ini file" (i.e. "let perforce manage the creds") and p4 then goes and loads the p4config.txt if it finds it
Maybe I need to restart the computer..? Restarted editor twice, still getting the wrong workspace. Is my P4Config wrong..?
user and server are correct
try also adding -ReplaceEnv since at the end of the day it's loading current config from environement variables unless p4 can properly find out the p4config file
(to the P4WriteConfig)
or, if everything else fails, just uncheck the checkbox and enter the data manually
unreal might be confused and trying to load things from the wrong folder, since the p4config should be in the root next to the Engine and Project folders - but since you're using editor from epic games store it might be looking in the installation folder or something weird like that
hard to say tbh
it's been many years since I used build from epic game store so I don't really remember (I use source builds exclusively these days)
Hm, P4WriteConfig errors out.
No matching clientspecs found!```
Even when passing them into the command. Maybe it is a launcher-build issue.
this means that it can't detect the default values from the registry/env vars since that's where p4 keeps it's config on windows
so you can pass those two arguments to help it a little 🙂
I tried those two arguments. Same result.
I entered the same data given from running p4 set
ok... open p4v, connect to the correct workspace on correct server, click "Connection" in the P4V toolbar click on "Environment settings" and click ok... this command should now run just fine
(opening that window refreshes global p4 config)
(and tbh, after you do the P4V part, Unreal should also load correct values even without writing those to p4config)
would anyone I turn on the setting that auto checks out assets I open to edit ??
just wondering cause i know there is a setting for that but not sure if people use it or not
I don't recommend it, since if your connection to the server fails unreal will automatically instead make the files writable without notifying you
and writible files aren't picked up by perforce unless you manually check them out or reconcile offline work
😦 I am running the command from my workspace root directory as well.
arr for now though it'd be fine wouldn't it cause I'm running locally the helix core server ?
i can see how it'd be a nightmare if your perforce server isn't locally on machine
did you press OK in the environment settings?
To be clear, I do have multiple workspaces on this machine. The MinutumWorksapce is the one that was previously set in the global P4CLIENT variable, which is what lead me to believe that Unreal just wasn't referencing my local .p4config.txt
Yeah
you should never use p4 set to set the P4CLIENT
as it completely overrides anything else
^these settings have updated afterwards. Main is the Workspace I performed those steps in.
At this point just enter the proper workspace and server directly in unreal editor without using the p4 config
it will save you ton of hassle
since the situation right now is really confusing... and I'm about to go to bed anyways, so I can't sadly help further
I didn't realize this was cropped in my previous image, apologies if this is part of the problem:
nope, all of this is correct
I appreciate the help none the less!
it writes these values into the appropriate environment variables when you click OK, so it sets it globally... which everything should pick up... but for whatever reason bunch of things is still picking up values from wrong workspace from whatever source
Manually entering it isn't a problem at all. I just didn't/don't like not understanding why the Use P4 Config didn't/doesn't seem to work.
for the same reason CLI is picking up the wrong workspace
as I've said before, "Use P4 Config" doesn't tell unreal to load "p4config.txt" and use that
it tells unreal "Ask perforce for the data"
and perforce then goes and looks for them based on current global settings
if it finds that p4config is set for the workspace set in globals... it loads and uses that
Hm. I thought when it found the P4CONFIG variable in globals, it would check for a p4config at the workspace root. buuuuuuuut I realize as I'm typing this that Unreal doesn't know where the current workspace root is until it's set to a workspace, correct?
yeap
Unreal literally asks P4 for the connection details and that's all it does
here, found it in source code 🙂
and "ClientApi" class is part of perforce C++ API
Okay now it all makes sense. I don't know why I assumed it was looking in the .uproject directory for a p4config 😅
I would've thought so too, but code says otherwise
Well, thank you for all the help!
easiest way is to manually type the things into perforce itself, which stores them in Saved/Config/WindowsEditor/SourceControlSettings.ini so unreal has consistent connection, regardless of what is currently used on your machine
easiest way is to manually type the things into perforce itself
Do you mean P4V or the Perforce dialog?
so got a question lets say I've noticed I need to add a delegate to one of my cpp classes, I've done so much work in editor, I have stuff checked out and altered. Would I be save to save all close editor make the change to the CPp class and then reopen editor and the changes etc I've made to the assets etc will still be there and the ones that were checked out will still be checked out ?
Yes, nothing will automatically check files in for you. You always have to do that yourself through P4v, the Editor or the commandline.
so i'm safe that the state I left things in is that state i'll get when I return to it so in this case re-launching editor after the code alteration
also I've got Rider IDE also on source control when I'm do with my stuff for today would I check out everything editor side and submit from either editor or P4V
and then Check out code changes
& submit
as safe as any other asset is when you're changing code. It all depends on the code change.
I don't know what you mean by "check out everything editor side and submit"
Do you mean review it? or the p4 check out operation?
sorry so lets say I've finished for today and the changes are one change to code, various changes to assets in the editor. Would I check in everything from editor I've worked on and then either submit using Editor or P4V. And then in IDE submit the code changes
or would I first submit the code changes and then check in the assets altered and submit them ?
just want to make sure I'm doing things the right way around
In this dialog on the image 😉
(I.e in unreal)
I submit everything through P4v. I don't bother with the Editor or IDE for perforce except to auto-checkout things. Everything else I use p4v or commandline.
How you break up your changes depends a lot on the work that's been done.
If the code you added is specifically to support the asset changes or you added new fields and the did some basic configuration, I'd check them in together.
If the code changes are kind of an isolated task and the content changes are more of a followup task, you could stagger them.
As long as you avoid a checkin with multiple, unrelated changes just because "I'm submitting all my changes for the day", it doesn't matter too much.
You'll have to feel out for yourself the particular granularity of checkin's you find are the most useful.
so in my case the work i've done on the assets rely on the code change so I'd just check in and submit everything at once on P4V
you can do either, u could submit just the assets and the code separately later, but this could leave someone pulling that first changelist and not the second with a non-functional version of the project, so its generally recommended to submit work often but try to submit batches of changes that belong together, so both the assets and the code together.
i personally tend to submit from within the engine, but thats a matter of preference submitting your changelist through either p4v or the engine will: submit the changelist, push through all the changes to the server and check in all the files you had checked out within that changelist.
Oh so you check stuff in after submitting ?
Or does the action of submitting check in everything that was checked out cause earlier I just submitted both code and asset alteration and it appeared to check back in stuff aswell
I find things clearest when in P4V. You see changelists and the files involved. Anything in the CL when you submit goes in.
Awsome
Hi all, what do you guys recommend to work with /Config folder in Unreal with Perforce? since files are readonly by default in p4, one would have to know which config file a setting belongs to and check it out, do you just make .ini files writable by default and deal with merge conflicts? The editor doesnt seem to auto prompt checkout of config/ini files unlike uassets
It will auto checkout the ini if the class is marked as DefaultConfig in addition to Config. But if you do that, you won't be able to have user-local configuration options in that class.
Ini's in the config folder should act like normal text files under source control. It's up to you to decide whether or not the changes you make through the project settings should be exported to the defaults or only affect your local environment. There's a button for that which will check out the ini and save it with your changes.
Can you show where that button is? All I get when try to change any ini is
should ini be text+l in typemap? I currently have it as just text
changes like collision settings etc should propagate to everybody
Ours are just text. Does the expected ini actually exist? it only check/edit. I won't create it.
It's this export button.
Strange. mine just gets stuck in checking file status
Config/DefaultGame.ini definitely exists
do other source control operations work?
damn, my bad.... I was writing documentation for people to work from home and changed my connection settings to something temp and forgot to change it back.
it works!
Shows up in submit changes/change list too
So when someone adds new files and submits through the engine plugin, it doesnt seem like you can sync those additions in engine, seems like in-engine Sync only works for changed files? Is there a way to get those new files in engine?
terminology checkup : by engine, you probably mean "editor"
Yeah, I don't know how you'd tell the Editor to sync files it doesn't know about.
You don't have the same problem when syncing from p4 because you usually sync a directory and not files.
I don't understand the problem, additions are certainly seen as a new CL and synced - am I misunderstanding the question?
I believe their problem is that in the Editor you can sync new revisions of existing files but it don't sync full changelists, just the requested files. So the Editor has no way to sync adds since it doesn't know about the file.
really? that's quite poor work for the editor version control system : E
I have defaulted to using P4V from the very beginning so haven't bumped into these walls
Yeah, totally. The only thing I let the Editor do is check-outs. I go to p4v for anything else
You'd have to close the editor to sync from p4v right? Otherwise you get locked files etc
the problem is someone added a new file to a folder, unreal wont let me sync that folder to get that file
Yeah. But I think you'll have to close the Editor for it to pick up new files anyway. It only checks for content on boot.
Yeah, I wrote a little batch for people to use, it closes the editor, syncs up, rebuilds, and runs
UGS is the ideal tool here, but it requires a bit of infrastructure to get the most out of.
While I applaud automating this sort of thing, sometimes I feel one may be doing a disservice to the devs who might do well to learn to use the version control tools at least to fulfill the bare minimum daily needs
Hi everyone, hoping someone can help me with this. I'm trying to open a project from a github repository, I generated the visual studio project files, but when I hit build it doesn't create the binary folder, and gives me this error.
Error MSB3073 The command ""C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat" MichifMuseumEditor Win64 DebugGame -Project="C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\MichifMuseum.uproject" -WaitMutex -FromMsBuild -architecture=x64" exited with code 8.
I'm just an artist and have no idea what any of this means. I have a bunch of assets to add to the project, but currently can't open it. Anyone know how I fix this?
Copypaste the whole log to a .txt file ( or locate the log file ).
Take a peek at it with Notepad++ or similar proper text editor and search for occurences of "error" - if nothing obvious jumps out, post the log file
I'm not sure what you mean by log, or how to locate it. Is that the big window above the error message in visual studio? I really can't stress enough how little I understand about anything relating to coding.
can you find an output window?
found it
Sorry about my lack of understanding in this and thank you for attempting to help
you can just ctrl+f in the output window as well of course
this is the only line with an error
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat" MichifMuseumEditor Win64 DebugGame -Project="C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\MichifMuseum.uproject" -WaitMutex -FromMsBuild -architecture=x64" exited with code 8.
post the whole text ( as .txt file is best )
Build started at 2:17 PM...
1>------ Build started: Project: MichifMuseum, Configuration: DebugGame_Editor x64 ------
1>Using bundled DotNet SDK version: 6.0.302
1>Running UnrealBuildTool: dotnet "....\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" MichifMuseumEditor Win64 DebugGame -Project="C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\MichifMuseum.uproject" -WaitMutex -FromMsBuild -architecture=x64
1>Log file: C:\Users\b1nar\AppData\Local\UnrealBuildTool\Log.txt
1>Using 'git status' to determine working set for adaptive non-unity build (C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile).
1>Creating makefile for MichifMuseumEditor (no existing makefile)
1>Total execution time: 0.60 seconds
1>Unable to instantiate module 'AgentPlugin': System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\Plugins\PureWeb\Source\ThirdParty\platform-sdk-cpp\x64-windows-unreal\lib'.
1>
1> at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) 1> 1> at System.IO.Enumeration.FileSystemEnumerator1.Init()
1>
1> at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) 1> 1> at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
1>
1> at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
1>
1> at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
1>
1> at AgentPlugin..ctor(ReadOnlyTargetRules Target) in C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\Plugins\PureWeb\Source\AgentPlugin\AgentPlugin.Build.cs:line 88
1>(referenced via MichifMuseum.uproject -> PureWeb.uplugin)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat" MichifMuseumEditor Win64 DebugGame -Project="C:\Users\b1nar\Projects\Michif Media\GitHub\MichifMobile\MichifMobile\MichifMuseum.uproject" -WaitMutex -FromMsBuild -architecture=x64" exited with code 8.
1>Done building project "MichifMuseum.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 11 up-to-date, 0 skipped ==========
========== Build completed at 2:17 PM and took 02.324 seconds ==========
Hmm what is the "AgentPlugin"... checking. meanwhile, make sure you have jumped through the hoops here https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine?application_version=5.4
pretty sure u're missing some SDK or other prereq
It's just the setup that is critical, the "Recommended Settings" area is all irrelevant
No idea what the AgentPlugin is, or what it's doing. I've got all the stuff in that setup section installed, except I don't see "universal windows platform development" as an option. Ok so that has been replaced with WinUI which I'm installing now
someone else pointed out to me that there may be some plugins or other dependencies that I'm missing so I'm just checking those now
a good move now would be to fire up the 5.4 editor and make a blank c++ project. if that starts up fine, you likely need a plugin. For that, can check your .uproject file in project root to see what it has listed
That started up fine. What do you mean by "check your .uproject file in project root"? Is that done in Visual studio?
can just open it up in a text editor
but yes, can also see it in visual studio
This?
I think that pureweb one might be important. How do I add or enable it if I can't open the uproject?
Can try setting it to enabled : false for a quick test
I assume you don't have a pureweb plugin in your project/Plugins folder
you will have to find that from github / fab / website wherever it is made
Apparently I do have a pureweb folder in the project folder so I'm guessing that's not the issue
and I seem to have found the "AgentPlugin" you were asking about before in there as well
hmm hmm
go to their website and see if they have setup docs
might check the original github site you got this project off as well, if their readme has any setup tips
actually, one thing that might also cause pain : your project is pretty deep in...
unreal can be finicky about path length, it is generally recommended to put your project root as high as possible
Their docs seem to explain to do the setup from inside unreal, but its not telling me how to do anything outside of that, nothing that I understand at least.
Ok, that I can fix. Just delete my project folder and create a new clone in a more shallow location, right?
yeah. Meanwhile you might consider adding the pureweb plugin to the blank project you tested earlier, sanity check that runs. if it runs, you might want to add an "Issue" to the github project you got this from asking about your situation
Ok I'll do that. I've already informed my client that created the repository of the issue, but I haven't heard anything back from them all day. Thank you sooo much for your help. I really appreciate it.
I copied the plugin folder from that project into a new test one and the test one now gives a similar issue message. Definitely has something to do with these plugins. I'm gonna have to wait until I hear back from my client and whoever he got to set this stuff up before I can add my assets I guess. Thanks for trying to help.
can try building that from visual studio
Severity Code Description Project File Line Suppression State Details
Error MSB3073 The command ""C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\Build.bat" testUEEditor Win64 DebugGame -Project="C:\Users\b1nar\Projects\testUE\testUE.uproject" -WaitMutex -FromMsBuild -architecture=x64" exited with code 8. testUE C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets 44
Same error message as the original project
anyone able to help at all, I feel that source control keeps altering my defaultengine ini or something cause only unitl I started using source control when I now go into PIE I seems to get the red warning about Megalights is enabled, and I need to use console command r.Raytracing.enabled to enable
Hello @arctic hornet, I have two questions about merges and updates:
- When you merge
//UE5/Maininto//ProjectName/Dev-EngineMerge, do you use P4V’sStream-to-StreamorSpecify source and target filesMerge/Integrate? - When updating the engine source, do you wipe your workspace clean before pulling and running
Setup.bat, or do you just overwrite the existing files and then runSetup.bat?
Hi @silver token , I’ve got a few more questions:
- Could you explain what each of the Engine streams is for?
- I figured
Engine.Project.Stagingis basically the same asDev-EngineMerge, but what’sEngine.Midsummerused for? - What’s your process for keeping
Engine.VersionedandEngine.Latestin sync? Do you just copy files over in file explorer, or do you use a specific feature in P4V?
- I figured
- How do you link two mainline streams together? And what’s that red “M” bubble in the stream graph?
to answer 1 and 2... I use the CLI rather than P4V it's more convenient... but... my flow is:
-
git clone + setup.bat
-
virtual sync of the
//UE5/Mainstream -
reconcile offline changes
-
submit
-
integrate
//ProjectName/Main/...to//ProjectName/Dev-EngineMerge/...usingp4 integrate(in new versions of P4 you have to use-Fflag too) - there should be 0 merge conflicts -
integrate
//UE5/Main/...to//ProjectName/Dev-EngineMerge/...usingp4 integrate -
resolve conflicts in p4v
-
submit
-
copy
//ProjectName/Dev-EngineMerge/...to//ProjectName/Main/...usingp4 copy- there should hopefully be no merge conflicts unless someone pushed something conflicting while you were working on the main branch
I don't hae the exact commands on hand right now, but I could find them if you want...
Thank you
- What is "virtual sync"?
- If I use
p4 integrateto integrate//UE5/Main/...into//ProjectName/Dev-EngineMerge/..., will it unnecessarily preserve older versions of files? Would it be better to first copy//UE5/Main/...to//ProjectName/Dev-EngineMerge/...usingp4 copy, then integrate//ProjectName/Main/...into//ProjectName/Dev-EngineMerge/...usingp4 integrateand resolve conflicts, and finally copy//ProjectName/Dev-EngineMerge/...back into//ProjectName/Main/...usingp4 copy?
It would be super helpful if you could also share the specific commands 🙂
virtual sync is the type of sync where you only tell server that "hey I'm syncing to this" but you don't really download any files... so it saves on the transfer teime
and since we're fully replacing the ingest workspace content with the new one from git and then use reconcile, it's fine to do that imo.
Okay, in theory, will the old version files in //ProjectName/Dev-EngineMerge/... be kept?
The (M) bubble is for merge operations that aren't based on stream parent/child relationships or otherwise break the expected change propagation paradigm between streams (generally you have a copy in one direction and a merge in the other, not merges in both directions)
Engine.Versioned is each of the major/minor versions in a subdirectory of the stream.
Engine.Latest is a copy of the most recent version of the engine that we've downloaded. So it's only 1 copy of engine source, no subdirectories for versions. Either p4 copy is used when updating to a new major/minor version or p4 merge is used when doing a hotfix. .Versioned & .Latest are always updated as part of the same task so that Latest is always latest. This removes the need to do reconciles when doing major/minor version updates.
Engine.Midsummer is the version of the engine with company approved engine changes applicable to any project we work on. Merges are expected from .Midsummer -> .Staging, but (M)-merges are cherrypicked based on approvals (theoretically). Our R&D sandbox uses this stream, so this is the first place I will compile engine changes and maybe do some plugin fixes.
.Versioned, .Latest and .Midsummer are (theoretically) updated shortly after Epic does a release. Pending engineering time. Currently we delay and take a hotfix version instead of .0 and then don't take another drop of that minor version unless it has specific fixes. So, again in theory, this only lags behind Epic releases by weeks and it's only having to update a single hotfix version at a time or to a whole new minor version.
Engine.Project.Staging is the version of the engine for project testing, build fixes, deprecation fixes, etc. This merge happens based on the project schedule and could lag behind Epic releases much longer, but should always take at least one hotfix version. We only really have 1 project now so this is why our company engine updates line up with the project ones but in a larger org they wouldn't have to. Also, once the build is working here it could be kept "on deck" until it's a good time to push such a disruptive change. Whoever is doing that upgrade would keep merging from mainline until it's time to roll it out to the team.
Engine.Project is the live version of the engine that everyone is using for day to day work. You'd also likely have Engine.Project.Release or Engine.Project.Demo as release streams as children of Engine.Project but those were omitted from the diagram for simplicity and it needs there aren't predictable.
You don't link to mainline streams together except by convention and their revision history. P4 doesn't know they're related, you're just doing merges back and forth between them.
the goal is to keep the history indeed since that way you can always track where things came from and perforce can also more efficiently do resolves because if the file did not change it's revision there's no need to merge it back etc.
Similar reasoning is used for the External Plugins setup except we don't keep individually versioned copies. We do reconciles each time since those are significantly smaller directories.
I think you're right. It seems that even if I use p4 copy to copy //UE5/Main/... to //ProjectName/Dev-EngineMerge/..., the old version files will still exist in the end. Because when I integrate //ProjectName/Main/... to //ProjectName/Dev-EngineMerge/... using p4 integrate, even if there's an old version of a file that is no longer needed, it will inevitably be kept, am I right?
ok, so... here we go... for simplicity, I'll have 3 workspaces, Main, Staging (Dev-EngineMerge) and Incoming (clean version from epic) it's expected you have 3 workspaces for them already created
- Ingesting new version (working with Incoming workspace):
- sync from remote p4 server or clone from git to Incoming workspace
p4 sync -k Incoming/...p4 reconcile -m Incoming/...p4 submit -d "New unreal version yaaaay"
- Merging to staging
-
p4 integrate -F Main/... Staging/... -
p4 resolve -am -
p4 submit -d "Merging game into staging" -
p4 integrate -F Incoming/... Staging/... -
p4 resolve -am- here you'll probably have bunch of things to resolve -
p4 submit -d "Merging engine into staging"
- Copy to main
p4 copy -S Staging/...p4 submit -d "New version merged"
I don't really have raw scripts I could provide since I wrote a tool for it few years back which does this automatically for me, so I just went through the commands it executes and gave it here
but at the end of the day, this is what I've came up with few years ago, it might not be the best or only way of doing this
That's more or less the same set of things I'm doing (just with a couple more stream steps). Though I don't automate any of it with scripts. I do some of it through the commandline and some of it through p4v.
Mine is automated with only expected break at 2-4 unless it automatically merges without outstanding conflicts... otherwise I just go, fix conflicts and hit continue
Hi @silver token
- Could you provide more information about (M) bubble?
- How is the (M) bubble created, what is this feature called in the documentation?
- And I didn’t quite follow "You don't link to mainline streams together except by convention and their revision history." If P4 isn't really aware of any link between them, I'm wondering how the (M) bubble is then supposed to relate to their revision history?
- When you say “Either
p4 copyis used when updating to a new major/minor version orp4 mergeis used when doing a hotfix,” is it referring to the commands used to copy fromEngine.VersionedtoEngine.Latest? - In
Engine.Versioned, if we put different major/minor versions in separate subdirectories (or separate streams) and upload them viaMark for Add, does Perforce deduplicate those files or will every subdirectory take up an extra copy of the engine's size on the server? It seems likelazy copyonly works when using specific commands likep4 integrate? - Do we need to build/compile Engine in
Engine.Project.Staging? If so, do we need to build Engine again after copying Engine Source toEngine.Project? - Should we clean the workspace before ingesting a new hotfix version engine source into the workspace, or is it fine to just overwrite the old files?
Hello @arctic hornet
- Is the purpose of
p4 sync -kto prevent conflicts during reconcile in case some files in the workspace aren't at the latest revision (like if an older revision was accidentally synced)? - Do we need to clean the
Incomingworkspace before copying files from a Git clone into it?
1 is there mostly in case you make new workspace, since you ideally need to be on latest revision before pushing new version etc. if you’re not it will cause issues during reconcile
2. Up to you, we clone directly inside the Incoming and then run setup.bat… so we don’t really clear that folder… but if you don’t want to keep the folder on your disk forever then… just remove it after and start from scratch next time
TLDR, pretty much whatever works… this is just application of standard 3-way merge procedure
Thank you very much!🙂
- The m-bubble isn’t real. It’s an indicator of doing something outside the “normal” flow for working with streams. The revision history is what you actually did. The stream relationships are meant to control what you can/should do. If you do things outside the norm, the revision history doesn’t care, it just tracks what you did.
- Yes.
- Yes, there’s duplicate files. I’ve never really found it to matter and day-to-day work has taken up way more space than new engine versions. If it’s a problem you can skip the versioned stream, just use a latest and do a reconcile for every upgrade directly in latest.
- The person doing the upgrade won’t need to rebuild because when switching back from staging to main, you already have all the engine files and have compiled them. It should only cause a compile for those that sync the update.
- I delete the engine source used to add it to p4 immediately after it’s successfully in source control, so it’s already clean when doing new/hotfix updates. That version of the engineering doesn’t even get built. I only build when I get to the Midsummer stream to test plugins. I have a project in our R&D sandbox I use for engine updates. I don’t bother building Versioned or Latest.
Thank you so much! I noticed in your stream graph there’s a horizontal arrow pointing from Engine.Versioned to Engine.Latest, with an “(M)” bubble above it. Could you walk me through the steps to create those, or point me to the relevant page in the Perforce documentation?
They’re just regular streams. That line is just a consequence of layout and doesn’t mean anything special.
I usually just use the StreamGraph window and right-click to make a new stream, there’s not that much to it.
But why do that arrow and the (M) bubble show up? Was it Photoshopped? I tried running p4 copy or p4 integrate between two mainline streams, but they still stay completely independent. 🥺
My entire picture is a construct. My actual Stream Graph doesn’t look like this because the streams exist in multiple depots and you can’t parent a stream to a stream in another depot. If they were all in on depot you might get something that looked vaguely similar.
The m-bubble is purely part of this documentation and not a thing you will find anywhere in perforce.
Hi @arctic hornet , a question just popped into my head
When running p4 integrate -f Main/... Staging/... and p4 copy Staging/... Main/..., should I filter some files? For example, exclude project files and only merge the engine source? If so, how would I go about excluding them?
I recommend doing everything, because you want to compile and test in your staging (Dev-EngineMerge) to see if everything is working before copying back to main
After copying back to main, do I need to build it again in main? Or I just copy over the engine’s binary instead?
you ideally don't ever want that kind of binaries in your perforce server... and ideally you want to build again since some things might've been pushed to main while you were working on Staging etc...
in general I always recommend building
if you use something like UGS it will automatically build when you sync to latest etc.
Got it, really appreciate you explaining that!
@arctic hornet @silver token
I have a question about storing different engine source versions in separate subdirectories under Engine.version. Since each new subdirectory ends up taking up another full copy of the engine on the server, could we avoid that extra storage by doing the following?
p4 copySubdir5.4 → Subdir5.5 (to trigger the lazy copy)- Clean Subdir5.5
git cloneEngineSource5.5 → Subdir5.5p4 reconcileSubdir5.5
just overwrite previous version in the ingest depot, you can always sync to specific revision and thus specific version of unreal and merge that
that way you'll store only the things that have changed
I suppose, but that defeats the purpose a little.
The whole point in my setup is to not have to do a reconcile when doing a 5.4->5.5 type upgrade.
If you're going to do a reconcile on a minor version update, you might as well just drop the version stream and do everything in Latest (which is basically klukule's setup I think)
yeah, my setup is to just slap versions on top of each other into one stream, since I can always get specific revision and it saves space on the server + makes it easier for me to do the merge since it's always the same routine etc..
Storing data in separate Engine branches for each version or one engine stream and subfolders has the same storage requirements where each versions is stored in full, which can be quite a lot
I’m thinking of keeping them in separate subdirectories or streams because I might need to go back and update earlier versions. For example, after going from 5.4.3 to 5.5.2, I might later need to release 5.4.4—so the history would read 5.4.3 → 5.5.2 → 5.4.4. And, "merging stream to stream" might feel more intuitive than "merge stream@CL to stream"?
Is this the recommended way to do it?
my recommended way is the way I do it, which is steam@CL as it worked for me
anything else I can't guarantee will work or what potential issues you'll have
but at the end of the day, do whatever suits your needs
Hello, how would I go about importing files like Setup.bat GenerateProjectFiles.bat from the engine source stream into another stream? Do I need to import each file one by one?
Like when using a stream's import directive?
If I import the root directory where the Engine is located, doesn’t that mean I won’t be able to place the Project in the same-level directory as the Engine?
No. You share the mainline stream one directory down and then share the engine stream at the root
share ProjectDir/...
import ... //EngineStream/...
that or
using two separate specs in case you don't want samples etc.
/Engine/...
/*
In perforce the * wildard is non-recursive wildcard, so combination of these two specs will take any file in root of the stream and then engine folder recursively
Oh, yeah. I've removed the Samples directory from the stream by the time it's getting imported for project use.
Now that you mention it, I noticed there isn’t a “Sample” folder or anything like that in your //Titan/Main, how do you exclude them when you do the merge?
I merge the /* and /Engine/... 🙂
So we have to merge twice every time?
yes and no, I just run the integrate step 2 times... but the rest of the process is only done once, so the resolving and everything is done only once
so I run only this line twice pretty much
Got it!👍
Hello, Sourcerers. Using P4V, how can I edit the host name of a workspace? I renamed one of my PCs and now I am locked out of my workspace. I have access to the Admin interface if needed.
Ah, managed to fix it. I had to click through a bunch of "Wrong host name" errors but I got access to the workspace -> settings -> advanced menu.
Hey guys.. AGain strange problem with github.. When i try to pull, those files appeared and i cant discard them. since i cant discard them they are causing conflict.. I cant even stash them because they re-appear.,
"those" files?
lmao i thought i sent a screenshot. Sorry. I fixed it by deleting the files from project directly.
does anyone know whether you can make perforce solve merge conflicts through IDE?
Maybe, but why? P4Merge is a dedicated tool that comes with p4v and does a better job. (there may also be better tools out there, I’m pretty sure the tool is configurable if you want to swap it out though I’m blanking on other app names right now)
idk
im used to IDE auto merging all non conflicting changes automatically
and then It just opens and i pick left right or my own
Im so confused by the perforce workflow
I'd never get revision through the IDE, ever
it's just easy enough to do it through P4V (and P4Merge when conflicts do occur)
p4merge looks like sh**
You get a pop up in p4v to resolve conflicts. The easy option is auto-merge but it gives you a number of well explained options. Only one requires a tool for manual conflict resolution.
What step are you confused about?
it's a pretty standard diff tool that mostly does a good job, I wouldn't say it looks like shit
but if you want to bring your own diff tool, you can configure that in p4v
WinMerge is still my tool of choice, but perhaps there are more modern alternatives : )
antiques : )
About that for example I tried unshelving changelist and it skipped added and deleted files
and now idk what to do
The shelf had files for add/delete that were already added/removed in a previous checkin?
I shelved files for review
and now i wanted to unshelve them to change something
but perforce decided that it will error out on added and removed files
Do the files exist on your disk and just aren't marked for add in p4?
Or are the files exclusive checkout and the reviewer still has them checked out?
I've never encountered this (except in cases where p4 popped up a message telling me why it couldn't check them out). And ultimately it's not something that changing the merge tool would solve anyway.
the added files still exist
the removed files dont
neither are in my default changelist now
Are they in the CL with the shelf? you can't shelve/unshelve the default CL.
what is CL
ChangeList
I dont get what you mean
there are always checkboxes like "Rmove files" or "Add files" etc... you need to check, perforce generally only does what you tell it to, it doesn't assume anything
"default" changelist (CL) cannot have any files shelved, it has to be a numbered changelist
you say they aren't on your default changelist. But you need to move them to another changelist to shelve them.
Are they now on that changelist?
well, the thing with reviews, swarm creates it's own copies in certain cases... can you send the screenshot of your P4V "Pending" tab please?
You should post a picture of what you're looking at, because everything sounds okay
geee, that's one big code review
also it's a gray triangle, which means this changelist doesn't belong to your user
it should be red or blue
Oh yea i have no clue how our perforce is setup
it might be best to ask someone from your team who's in charge of your perforce server and swarm to be honest
Maybe you should be asking a colleague rather than rando's on the internet
well... first of all... any binary assets in the shelf?
yes
that's most likely your issue
binary assets usually have exclusive checkout
in general you don't send binary assets for CODE review 😄
and you cannot unselve those files because swarm itself has them checked out
oh so this software plays some magic 3d chess
no, the rules are consistent and simple... don't take it wrong, but improper use is the key factor here
either way, code reviews and the way swarm works with shelves might be little confusing for people that have not done this before... so it might be easier for you to not use swarm to be honest
and if someone on your team or your company mandates that, they should have someone on hand who understands that and can help
Hello! Should .vsconfig and Engine Plugins Binaries be excluded? I noticed that most .p4ignore files don't ignore them.
/.vsconfig
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor-Paper2D.dll
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor-Paper2DEditor.dll
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor-PaperSpriteSheetImporter.dll
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor-PaperTiledImporter.dll
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor-SmartSnapping.dll
/Engine/Plugins/2D/Paper2D/Binaries/Win64/UnrealEditor.modules
/Engine/Plugins/AI/AISupport/Binaries/Win64/UnrealEditor-AISupportModule.dll
.vsconfig is generated, with build products that depends how you deliver PCBs to your team
I have added following ignore rules, please correct me if there are any issues.
.vsconfig
# Ignore NET binaries
/Engine/Binaries/ThirdParty/DotNet/**
/Engine/Binaries/DotNET/UnrealBuildTool/**
/Engine/Binaries/DotNET/AutomationTool/**
/Engine/Source/Programs/DotNETCommon/BuildUtilities/bin/**
/Engine/Source/Programs/Shared/*/bin/**
# Auto generated
/Engine/Plugins/ScriptPlugin/Source/ScriptGeneratorUbtPlugin/ScriptGeneratorUbtPlugin.ubtplugin.csproj.props
/Engine/Source/Programs/Shared/EpicGames.AspNet/Properties/launchSettings.json
Hey!
I'm building an engine from source using UGS. And it's only using 20-30% of cpu power. How can I increase the number of cores and parallels for the build process?
UGS not installed. Just opened via .exe
UGS just calls Unreal Build Tool... UBT in general tries to use all the available core unless there's a memory bottleneck, since in general you require roughly 1.5 GB of RAM per core for unreal to build succesfully
(that's if you're not using UBA - when you're using UBA it manages things on it's own and in general tries to use every available core - but again, will throttle things when there's not enough ram)
if you have intellisense installed when you shouldn't(dont have a license) that could also limit performance.
It was a lot simpler than that.
I checked everything, but on this I couldn't even think that the person installed the project on HDD disk...
Thanks for your help 🙂
that would do it...
Hey all, I need some help, and I honestly can't figure it out, even google or GPT, so maybe its something stupid.
Why is my Perforce client not realizing I have a setup .p4ignore file?
GPT kept going on about an environment variable, so I set that.
Google was more about if the file was setup incorrectly.
I believe it should all be correct, but I must be missing something.
GPT also kept speaking about an environment variable I can edit under the connection tab, but I see no such thing
I see all these old posts, but I feel like i've been through all of that, and even copy/ paste one of the files above that they said has worked for them.
yet, no luck on my end.
It must be something simple, I hope. 😛
Do you think a Perforce server (e.g. Helix Core) is worth it for a small dev team (2-3 people)? I am just starting to onboard additional people onto the project and I've had issues with syncing git projects onto other machines (possibly redirector issues, idk). But git diffs are borderline useless so it is going to be a challenge to collaborate without some kind of tool that helps with understanding what changed when someone merges something. I don't think file locking via git lfs is an adequate solution for that, personally.
For unreal perforce is generally the best way to go… might require bit more setup and figuring out if you’re not familiar with it… but unreals ecosystem is built around perforce in the first place… perforce is also free for up to 5 users (and 20 workspaces)… but once you need to go over that licensing costs can get quite steep (roughly 30 usd per user per month… you pay for whole year upfront and you have to pay for everything not just extra over the free limit)
open a cmd window
type p4 set
do the values make sense?
open P4V
right click on workspace root
click "Open Command Window Here"
type p4 set
do the values make sense? are they the same or different from above?
Hello, how can I pass both the file and its revision using custom tool? %d@=%c gives the error "More than one replaceable file argument of type %X is not allowed."
mate please delete this lol
blur your ip/user/passwd somehow
such lisence much power
Lmao, was it not encrypted
Well...
Minus the fact, that I appear to have just shared my perforce login...
All the data was matching, so?
what symptom makes you say it's ignoring your ignore?
If I include like *.sln
or, the default */saved/*
I can still add either of those.
Even though, at the very least.
Every file with the .sln extension should throw some form of error on adding
Sure I don't gotta blur any login info. LMAO
BTW.
Since, I didn't realize it.
Do, I just need to change my passwords and stuff.
Or, did I share some like extra secret info?
changing password would probably be enough
My .p4ignore:
#
# The syntax for P4IGNORE files is not the same as Perforce syntax.
# Instead, it is similar to that used by other versioning systems:
#
# - Files are specified in local syntax
# - a # character at the beginning of a line denotes a comment
# - a ! character at the beginning of a line excludes the file specification
# - a * wildcard matches substrings.
#
# For example:
#
# foo.txt Ignore files called "foo.txt"
# *.exe Ignore all executables
# !bar.exe Exclude bar.exe from being ignored
#
###############################################################################
# Epic's P4IGNORE.
# P4IGNORE doesn't work like GITIGNORE:
# http://stackoverflow.com/questions/18240084/how-does-perforce-ignore-file-syntax-differ-from-gitignore-syntax
###############################################################################
# Ignore root Visual Studio solution files. We do check in some sln files in subdirectories, so only ignore
# the ones found in the root.
/*.sln
/.p4sync.txt
# Ignore all Visual Studio temp files.
*.suo
*.opensdf
*.sdf
/Engine/DerivedDataCache/*
**/DerivedDataCache/Boot.ddc
**/DerivedDataCache/**/*.udd
# Ignore all Intermediate and Saved directories
*/Intermediate/*
*/Saved/*
# Ignore UBT's configuration.xml
Engine/Programs/UnrealBuildTool/*
*.uatbuildrecord
*.tmp
# Ignore built binaries and temporary build files
*/obj/*
*.csprojAssemblyReference.cache
# Ignore UBT's log output files
/Engine/Programs/UnrealBuildTool/*.txt
# Ignore Python cached files
*.pyc
# Ignore JetBrain's IDE folders
.idea/
!.idea/runConfigurations
.gradle/
# Ignore autogenerated files from HoloLens WMRInterop
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/packages/*
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/Generated Files/*
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/x64/*
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/ARM64/*
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/x64/*
/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/ARM64/*
# Ignore files added by Finder on Mac
.DS_Store
# Ignore all .code-workspace files
*.code-workspace
```
if you want to get really serious, change password and somehow use p4 logout to invalidate any issued tickets
https://help.perforce.com/helix-core/server-apps/cmdref/current/Content/CmdRef/p4_logout.html
-a
basically when you "log in" perforce generates a ticket hash and that is stored on your PC... it's valid for some number of hours that you can set, default half a day. the ticket works like an alternative to having the password
I see, ok.
I'll be sure to do that.
Since, I can't tell if someone, no joke.
Already tried to delete my server side files...
after that -- what happens if you add just *.sln instead of (or in addition to) /*.sln ?
same for saved -- */Saved/* will not be the same as Saved/*
it depends where your workspace root and your ignore file are which you should have
but probably no harm in having both entries, either
Alright.
Thanks for the input.
I'll have to get back to you tomorrow.
After casually doing what I just did, and it being 2AM.
I don't think I wanna mess with Perforce, for the rest of the night.
Knowing me, i'll post the login info to my email, from like icloud set
Getting back to this.
Still no change.
I will say, in the P4V ui, the .p4ignore file has an icon that looks different, but still no add prevention.
Even with the *.sln, and adding a test.sln
We also have this person up here.
Sounds like they've been using the same/ similar file, fine.
So, I honestly don't know what i'm doing wrong.
I even tried to p4 set P4IGNORE= to the absolute path, and no luck.
make sure you are using .p4ignore in both places, not p4ignore.txt in one and .p4ignore in the other.
Whats the other?
You mean windows environment variables?
In either case.
All 2, or all 3 areas are using the expected .p4ignore in the value.
Both p4 set results (As suggested by HoJo)
and, the windows environment variable.
the actual file you use that holds your file definitions to ignore
Whats the other place?
Is it not just the workspace root it needs to be in?
is it possible to make UGS not have to download all dll/pdb unless its actually changed, cause atm its like ~2gb sync for binaries every time
are you using the megazip on p4 method? because then no
in general UGS doesn't support delta downloads, it just downlaods whole PDB as one big package
and if you have only 2 gig sync good for you, ours are almost 7 GB 🙂
Hey, I see you chatting a bit in here.
You have any idea for my issue with my .p4ignore file, not being used/ detected?
hard to say, there's plenty of issues starting with misconfigured P4IGNORE variable, or you've originally set up your server using p4d older than 2023.2 which on windows looked for p4ignore.txt rather than both .p4ignore etc...
or your p4config is saying otherwise if you have one
etc.
or the file might be found and read, but has wrong syntax so it doesn't do anything
but right now I'm just throwing ideas on the wall since I have 0 information about your setup
What in-depth context do you need?
I'm on windows
Server setup like 1 year ago, so not 2023 (but, idk how to check the actual version?)
I've tried both .p4ignore, and .p4ignore.txt
I have the correct windows environment variable
I have correct, and matching p4 set info.
I believe the syntax of the file itself is correct, but someone a couple message back suggested a simple syntax test, and no luck.
.p4ignore should be fine
Is it in project root?
Can also check "p4 info" run from project root
was thinking to use like a rsync system
and modify ugs to pull from rsync
you could try unsync if you dare... it can fetch from horde
but I'm not sure how it works with other files being in the same folder that are not fetched through unsync
UESync basically pulls what changelist the binaries were commited at to determine if they are viable for previous commits right?
UGS*
UGS just finds appropriate zip from p4 (or blob from horde) downloads it, keeps a record of the files, nukes old ones and extracts new ones
yeah but it doesnt let you sync unless there is a correct version built
so it must read change name to make sures its newer than what your synching
yeap, it's determined by the code change
in P4 it reads the description iirc
and with perforce it uses bunch of artifact metadata like this
but would rsync really work with binaries ?
Hmmm, maybe this is the issue. 😛
p4 set shows the P4IGNORE value
But
p4 info shows no P4IGNORE value in it.
to make a difference(only getting deltas)
not sure about rsync, but I know that unsync works with binary files and does download chunks
horde can "speak" unsync too
it's mostly a matter of whether unsync work when there are other files that are not in the manifest... I'm not sure about that
i really want to get PCB's done for all stuff in one build
(i.e. if it would try to nuke repo)
that's unrelated
unsync is just a way to fetch the PCBs
horde already supports unsync... unsync works well with binary files etc.
you just need to replace UGS routine to call Usync and fetch blobs that way etc.
yeah but this is related to what i want to achieve
cause UGS pulls says MyGame-EditorBinaries
but if the project is in the same engine
so same folder
same workspace
it would sync engine binaries twice
well, every game can have different compile flags etc.
and that's also where unsync comes in play, it can do diff downloads
so it figures out what needs to be downloaded and what can be reused that's already there
cause the two "artifact pcbs" would have X project and engine, and Y project and engine
if that makes sense
benefit is... you can still use horde as your storage, potentially fall back to default ugs etc...
you'd just use smarter way of syncing the binaries
oh but if i build pcbs for all projects
and ensure UGS uses the same PCB's
then it doenst matter what one i sync?
but how to do that with horde..
if you'd have two distinct sets of PCBs it would not download the things that are shared
if you shove everything into one big pile, you'll be downloading a lot of data
why? that would just make the PCBs large
just do multiple different PCBs, horde and UGS supports it
well then pack it all together into one archive
horde doesn't care
yes, because normally it's intended for use with one specific project
even though i do
so if you tag it properly (and potentially tweak the search heurestic in UGS) you'll be able to achive that
its just i want t oavoid having to download like 5 engines
for projects
cause not everyone had 4tb storage
or... you can also provide multiple distinct PCB sets for one project in UGS, one with PDBs and one without... UGS will give you a dropdown where you can select
