#source-control
1 messages ยท Page 68 of 1
In Perforce, how can we, as almighty powerfull admin, remove a "lost" user workspace that has multiple file checkout ?
The goal is to uncheckout all of them
You can use p4 opened -x to list all exclusive checkout files currently checked out
and then you can run p4 -u TheirUser -c TheirWorkspace revert -k //path/to/the/file
p4 revert their pending changelists as a superuser, and then delete the workspace
p4 revert -C the_name_of_the_ws //... should work for that,
as long as you're a superuser
oh that's a better way ๐
thanks a lot !
Is Bitbucket a decent replacement to Perforce, since I still couldn't get it to work?
https://youtu.be/JbyawFZ1Rz4 this is the tutorial I am going to follow
https://bitbucket.org/RobBCreates/unrealthirdpersontemplate/downloads/ Source / Version Control:
This playlist will cover multiple ways to work with source control with UE4.
This Video:
In this video, we cover all of the steps required to get a BitBucket repository and the SourceTree desktop app working with the Unreal Engine.
Links:
Platform...
imo, no
also it's git, so yeaaaaah
Alr thanks
Also I already changed back to git with lfs
I sure hope it's fine this time
lfs is a hack on top git which doesn't hold a candle to how p4 handles binary files
If you are not satisfied with p4 and have troubles with git lfs, you could look at plastic scm. I haven't used it myself, but I've heard great things. Might be a bit easier than p4 and less rough edges than lfs
But p4 integration undoubtedly gets the most attention from epic. Although someone here is doing a lot of work on the plastic integration
Srombauts I believe
I know there's a plastic developer who hangs around here, but I wouldn't wish plasticscm on anybody
I would really want to know why p4 wasn't working for you, maybe it's just cost. I would rather work towards making custom tooling to make git more liveable tbh
Yeah never used plastic myself. So can't really say otherwise.
Custom tooling can be a rabbit hole that quickly surpasses any concerns around cost of licensing p4. A month of dev time isn't cheap. Something to consider when weighing up custom tooling vs licensing
yeah that's true because a lot of the epic tooling provided targets p4 (UGS, robomerge, the source control integration in engine being first class)
though I do wonder if the p4 setup was more like "I don't know Linux and this VPS stuff is confusing me" too
therefore going for the more managed route of bitbucket/github/gitlab/etc
Looking at the latest plastic plugin commits, SRombauts seems to really try to get the plugin to a similar state as the p4 plugin. Also plastic is planning great features that would make UGS pretty obsolete for pure projects (not editor), for example, you can checkin binaries and they will only be kept for a certain amount of time. We currently checkin binaries, but while the sources from a year ago are still relevant, the binaries are pretty much not (and we can always rebuild them anyways)
So yeah, plastic is great indeed. I don't know much about p4 (I'd like to try it at some point but it's expensive and again another tool our team would need to learn)
Hey hello!
I am indeed working on the Plastic SCM plugin, the goal is to make it feature parity with Perforce, as robust and more performant (since the underlying VCS is often faster than P4)
Right now I am having a developer review my code for support of Changelists https://github.com/PlasticSCM/UE4PlasticPlugin/pull/32
should be merged in a couple of days, yeah, victory!
I think that the current Plastic SCM plugin is pretty solid
Then, we intend to also dive into the other important tools like UGS and robomerge, if possible with assistance from Epic Games ๐
that's what I was about to ask: Do you have connection with Epic people? Imo plastic is worth considering for many indie studios
btw (out of curiosity): does plastic cloud version support the git bridge? (only if you know, I know it's offtopic)
I'm currently reading the new plasticscm features. Dynamic workspaces, wow. Incredible times are coming!
Do you have connection with Epic people?
I cannot comment on that
does plastic cloud version support the git bridge?
I don't know
Dynamic workspaces, wow. Incredible times are coming!
I cannot comment
;p yeah I am useless ๐
dynamic workspaces look nice, but I wonder how far it goes
I guess e.g. if you want to build your code, you would have to still download it all instead of working in this dynamic way?
I only know that it is actively developed and would be foundational to many more interesting features, so it's something to follow ๐
It wasn't very robust when it was initially released in alpha, but I don't know how much progress has been made on this front
look cool though, just wanna know how far it can go
I can imagine it a great feature. There are so many textures you add with packs that you never need to load. If Unreal doesn't touch the files, they shouldn't be downlaoded, I guess
also WIP animations, or animations you use in sequences to build customized animations (and only those customized animations are loaded)
@reef oriole thanks for answering (and being here). Of course you can't comment on everything as you're obviously very focused on making a great plastic plugin ๐
(that's worth more than answers)
But, when you trigger a build and your build system needs to access a few thousand files, [...]
So we added a prediction system based on previous use by other teammates. So, plasticfs knows that when you read foo.c, most likely other 100 files will be read after too, so it starts downloading them in parallel, so the one by one fetching doesn't happen, and everything is faster.
hmm interesting
I don't like that it works based on previous use by teammates. especially in a team with people with different focuses (eg artists, tech artists, designers and programmers), they all need different files. If I open a blueprint I'll access other files than an artist.
OTOH it's possible that it's just a great feature as it speeds up level loading times a lot.
I think that it can help developers and build machines know that they need to access all the source code all the time
Same with the assets; it should help pre load all assets strictly needed to load the editor, and then those needed to play the game (core gameplay etc)
I will want to test it with Unreal Engine, but without a team working as in a studio it's very hard to reproduce real use case imo
Off topic but I'm very curious about why you can't comment on having (or not having) connections to epic? Is that stuff normally under nda where you can't disclose it?
It's actually the only one that I should probably not comment until perhaps I can say something
(sorry I am not used to working for a big company ๐ )
Ah fair enough. I've never worked in software or any other industry or position that has required an NDA so I was curious about how it works. I understand that some places will not let you even speak about code design and stuff which imo is weird but probably a good reason
I am not bound by an NDA, I can speak openly about most things as long as it's either done or being worked on actively, or that it's on our public roadmap
all this in order to not introduce false hope and bad business decision on hypothetical things that may or may not land as expected
Just speak about stuff and end it with "but idk" so you can't be held accountable
Lol ye its a solid defence. Lawyers hate this one trick
i plead the fifth
I'm checking PlasticSCM's website and lol at that comparison table with other VCS
I killed a member of the Rowling family. jk!
Hey guys, im very new to all this, what is perforce exactly? What does it have to do with switchboard and syncing projects with ndisplay and a multi user server
Do you know what Git is?
Not really
start by going and finding a couple of youtube presentations on Version Control Systems. don't skimp out, put some time into this
Anyone know P4V well? ๐
yes but don't ask to ask
Thank you but can you at least summarize what it is, noone out there is straight forward and there seems to be many different versions such as p4 in switchboard
no. youtube.
I can say GIT, Perforce, Plastic, SVN are names for common different Version Control Systems made by different companies. beyond that, learn generally what VCS's are for, and then learn how to use one or more of them
We have a series of issues, it's complicated. Basically I have an asset with a red check, and we can't check it in. We need to resolve other issues, and can't seem to. Sorry, probably too complex to explain here. My bad.
so you need to resolve? you probably should be using exclusive checkout for uasset files though
alas, we will never know
i only just realised what exclusive checkout means and its been showing up on my PCB file. does it matter for that since its never checked out?
pcb file?
ah. sorry. out of my league then -- but if everything has been working then that probably means the system that produces that is set up properly to check out the zip file and submit it when it needs to
not really since only your build server should be writing to this file
I would even remove the write permission from all but your bot user too
hey im having a bit of trouble getting permissions set up in perforce. im trying to make my CI account (TeamCity) have write access and everyone else have read-only by default. apparently the access level text write (no write) means readonly? but its also making my CI account readonly even though theres a rule to give it write access?
I believe the rules are evaluated in order and the first rule matched is the one used. You probably want to move your teamcity rule above your read only rule. Youโll notice the up/down arrows above the rule list. Use that
i should have mentioned i thought the same and tried this. didnt change the text on the top-right. i also tried making the user name lower-case and restarting p4admin. i havent tried actually testing the permissions because i dont have spare changes laying around to test with
Ok, alternatively, you could create a new group and anyone with write access gets added to that group and the rest of the users default to read only
As a slight shakeup to how you are structuring
Rule sets quickly get overly long when doing it per user. Basing permissions on user groups is usually easier to deal with
alright ill do that then, thanks
Yeah maybe as a start have a read only group, a dev group and a ci group. And add the users to the appropriate ones. Then you probably only need 4 rules in your table. The super rule and a rule for each group
Oh and no access rule too
Someone ever met this problem on Linux ?
SSL library must be at least version 1.0.1
I don't know how to update it, do I have to do it globally with apt-get or in a UE plugin ?
I occurs when I try to connect to source control with perforce
Are you accessing perforce from Linux? If so which distro?
Or is your server running in Linux
Yes Iโve installed UE on Ubuntu 22.04
Could be as simple as apt update and apt upgrade but you would need superuser access to the machine. Can't really help you otherwise without knowing more about your set up. Curious why you are using it on Linux instead of windows which it has way better support for
I do most of my work on Linux and I was tired of switching boot so I installed UE on linux :p
Are there any VC resources for a multi platform project? I have a project using 4.27 launcher build, and I want to make another build using a 4.27 source build (oculus fork) with platform specific features. Am I just supposed to #if #endif everything as 1 main project and just use the other version to build what I need? Trying to wrap my head around how to tackle this
Use git switch <branch> instead
Really depends how you structure it. Your main concerns are to reduce code Duplication (which reduced the cost of maintenance) and also to maintain code readability. The preprocessor is one way to do this if all/multiple parts of your project access the same files but you want specific behaviors on different platforms but the behavior is otherwise mostly the same. Another way would be to have some sort of interface setup which would abstract common function calls and you write an implementation for each platform. There's definitely some other ways that I can't think or don't know but there's no single solution that will give you perfect results
For version control it would probably just be branches which get merged in at some point but I'm not at that stage so I can't give you more details
hi there, the version blueprint diff against depot (or history diff) doesn't work anymore, and I suspect it's linked to my recent git+gitlfs upgrade. The downloaded temp files are just the pointers, they are not converted to binary anymore. I suppose there is something to setup about smudge config, but I can't figure out what. Any idea anyone ?
$ git lfs version git-lfs/3.2.0 (GitHub; windows amd64; go 1.18.2) $ git version git version 2.37.0.windows.1
and UE 4.27
I think this should go here? I hope so. Kind of a strange question. Can anyone link me an example of a great GitHub Readme for an indie game? Just to have a reference for my own.
Why would you need a fancy readme for your game? ๐ค
Why would you not want a nice readme for any software project? Maybe some recruiter will check the source one day and the readme is basically the first impression, no?
I suppose the readme will grow with your project ? What would you want to share in the readme ? To who ? Why ? I would also google something like 'github game repository'.
Just some basic information about the project. What it is, what you can do in the game, basic controls, external assets that were used. Yes it would grow over time. I found some very basic ones, like this one: https://github.com/Voltstro-Studios/Team-Capture
I was just curious if someone knows a project that did this, just for reference, but the more I search, the more it seems that's not really a thing for games.
quick followup, it seems removing --skip in .gitconfig on these lines solved it:
filter.lfs.smudge=git-lfs smudge --skip -- %f filter.lfs.process=git-lfs filter-process --skip
@fresh marsh I think that most things like controls would not really fit in a readme. It should be pretty easy to play the game and everything you need should be inside the game. The readme would probably be more useful to quickly describe what the game is about (like a short store page) and (since it's a repo) the technical sides of it (features, how you implemented stuff). That said, I think it can start pretty small and grow over time. Especially for a game I think you shouldn't focus too much on explaining how the game works, better show a few screenshots.
Thanks for the tips! Yes the readme is definitely not for the players, but for anyone interested in the codebase. I'll figure it out over time, just like everything else ๐
What do you need to know? It's a pretty standard setup with git and source tree is just an interface, it doesn't change the setup
I'm very scared, hopefully it wont override operations I already done while "working offline" mode is active
i didnt realize it was offline since two months, i was wondering why i have to manually add files ๐
you need to activate windows
no 
you can buy very legal keys for like 3 euros
Bill Gates would like you to
I just refuse to pay anything to Microsoft until I really have to
I think I can live a few more weeks without a license ๐
such hate for things you use every day smh
Like UE, Discord and many other things 
It's warrented
noted
well i need to know how to set it up with source tree and git
because ive tried , and failed lol
for instance, i add my project(locally), then want to push it, but it doesnt work because the files too big
i tried to setup sourcecontrol with github but for some reason it just used the local directory how do i reset it to change the actual settings?
what is meant by "it just used the local directory"
i typed in the link of the private repository with .git at the end and then i saved i thought maybe i need to login but it just made the local game directory to a git repo wich doesn't make any sense
still ???
it makes total sense with the nature of git that it would show the local directory
you see in the screenshot the path
you push your changes to a remote
yeah but in the online directory is nothing
so did you push?
where do i push then
well what did you do first of all
I'm not well-versed with the in-engine git, but try pushing from your git client
idk where in source controll it says that anything is up to date but it isn't
but than why do i set up source controll when i just use a vanilla git repo
also there is no setting where it shows my repo github link so i assume still that it only made a local git
so you didn't clone from that?
no because its empty i want to make a new repo on github nothing more
with the game sourcecode and sourcecontroll set up
so how do i reset sourcecontrol
nevermind i just didn't find the push button because you need an extra plugin not just the standard one
You probably need LFS
git lfs is installed
You are using a git ignore file right?
yup
๐ค Not sure then. Does it tell you which files are too large?
nah, just says remote disconnected
Weird. I don't use git myself so I can't help you much further
ah ok, no worries
im getting batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
whats a cheaper solution than github
micro instance on aws? or droplet on digital ocean?
will look into these thanks
so sad github limits these days.
How do you guys handle multiple projects in perforce where all of them are source builds? Do you submit the engine source to each depot? Or do you have a single engine depot and pull both of them for CI and stuff?
at a previous job with multiple projects it was an independent copy of the engine, though technically was branched from the same base with the clean engine
one product will be stable and you don't want to upgrade the engine just because the other game needed an engine upgrade
I see. Sounds like a tricky situation
I don't have any branches set up yet, it's just a single stream depot with the entire engine source and project and I was thinking of doing that again
You typically have a stream depot per-project
I also have a depot with the clean engine to make upgrades easier
At the moment I have a stream depot which houses my mainline (engine and project), precompiled binaries and also the ugs source. I can probably break ugs into its own depot since it's not related to the project
Ye I remember you mentioning that before. I think I can understand how it works but I'm still quite new to perforce and don't really want to break my current set up trying to do that
Is there a way for perforce properly detect a repository that was copied and pasted?
I have downloaded a large repository from my network that I had one another machine. I move all the files on my local network because it was faster than pulling the same data from the remote server.
but when I run get latest it still goes through all the files?
Did you set up your workspace to use the new folder?
best source control for UE5?
Genuinely curious, do you mean financial cost? Or other cost (like emotional or time)
The cost to your soul, it's a deal with the devil ๐
yes
The cost for licenses
mainly financial though
Ah. I guess I'm lucky I can self host it. Found a great guide to run the server in a docker container
yes, licensing costs (not hosting costs) which are huge
But I must say this is the best source control for UE5, it's just complex to setup and admin, and can eat your hardware (can require a lot of memory and cpu)
if you can afford it, it is hands down best source control
If SRombauts even agrees you know it's true cause they work for competitor ๐
oooooooooooooooooooh no i dont have that many users yet
ah. this isnt an issue for me at the moment
Then, let me just add that, if you are on a very small team, it can be interesting to look at other alternatives that could end up being easier to setup and use. Subversion was a good free option with good tooling, even if it isn't much maintained anymore
I am working on integration of Plastic SCM into Unreal Engine 5 atm and I must say it's working very nicely ๐ (way easier to start with)
oh thanks. im sort of enjoying perforce at the moment. it wasnt too difficult to set up it was mostly learning how it worked coming from git.
Everyone has to agree that Perforce is the default source control in the game industry
It has the best integrations with all the tools because it has been the default for so long, so it's unbeatable in the short term I would say
A lot of people tends to dislike P4V UI though, and then get bitten by some problems like trying to handle streams (and merge)
I know quite some big companies are making some move toward Git with specific tooling, for licensing cost reasons
edit: Also some people have been vocal in saying that we should have more competition, it's not very good that only one trust too much of the market
Does anyone know why i don't see stream in perforce p4v?
Hi guys ! I'm looking for a Perforce build available on Debian arm64, does it exist ? ๐
You made a classic depot instead of a streams depot?
oh, right! thanks
Hello, I have a source control related issue (using Plastic) when creating an asset from c++ the source control apparently instantly tries to check it out before it is saved, accesses a memory address it is not supposed to and crashes the editor(I don't know why I had no such issue before today, I'm guessing this is a threading problem). Anyone knows if I can "pause" source control during the function execution ?
when creating an asset from c++
you mean, you have some Editor code that creates an asset, and this is triggering some automatic add to source control
right?
yeah
where is the crash happening? do you know if it's in the Plastic SCM plugin?
What version of the Editor are you using? and what version of the plugin? (latest from Github?)
I don't know if you can "pause" source control, I don't think so, but perhaps can we dig this if needed
I think the best would be to first find the root cause, see if it can be fixed
If you can open an issue with the logs & the crash callstack please, with all other info
https://github.com/SRombauts/UE4PlasticPlugin
Using unreal 5 with the plugin that's packed in (1.4.6) the code happens on my side/unreal's code, but disapears when source control is disabled (and I do get a popup saying the asset couldn't be check out before the crash).
Going to try to update the plugin first see if it persists.
Updated, but the crash remains (gonna open an issue)
It does not. Only x86/x64 archs are supported for linux
Any tips for packaging the crash info ? is there an etiquette to sending these (never done a bug report through github)?
Damn my VM only support arm64
don't you think it might work ?
It depends of what you have; just the log with the complete readable callstack is enough, but this means you would have installed the PDB symbol files coming with the Engine (or compiled it yoursefl)
Else you can zip the Saved/Crash folder or attach the relevant text files
(make sure there is nothing you wouldn't want people to see in your logs)
It's a 4 years old version so if you know what you're doing by all means go ahead ๐
let's try it ! ๐
It's built against the 2.6.x kernel so make sure you have one that matches
what is 2.6.x kernel ? ^^
Ubuntu version?
type uname -r in your terminal of your arm64 VM
Oh no
The kernel is the heart of you Linux distribution. It's the operating system in itself, and all the rest is the tooling/ui to make use of it
But 2.6 is very old, since latest linux kernel is no 5.18.9 https://kernel.org/
Oh yeah damn
i'm 5.10 
๐ซ
Is there other source control working on UE that are compatible with arm64 ?
Gitlfs or subversion
thanks i will take a look
done btw. I can work with the plugin disabled for now, so not a critical issue.
yea
well how familiar are you with VPSes and Linux?
going from github basics to this.
github is paid this is free. might as well learn it.
if you copied files locally into a workspace, you can call p4 flush to refresh
getting stuck at this ```Connect to server failed; check $P4PORT.
TCP connect to perforce:1666 failed.
No such host is known.
but i just updated the ports to allow access.
check your system vars on the CMD line with p4 set
p4 set P4PORT=your.perforce.server:1666
did that
C:\Windows\System32>p4 set
P4EDITOR=C:\WINDOWS\system32\Notepad.exe (set)
P4PORT=your.perforce.server:1666 (set)
P4USER=Atom1k (set)
says its all set
but as soon as i click new it gives me that error
if the server is on AWS (or whatever) you'll need to allow your IP through in the security group
you can also add ICMP allowing you to ping the port for testing
subversion work fine ! thank
ok sooooo
today i tried using bitbucket cuz i couldnt publish to github
and now i know i cant exceed 2 gigs on bitbucket
but then
how am i suppos to upload my ue5 project?????
any ideas?
i am using source tree, and i made a repo before hand btw
pls @ me , or reply
You need to update your github account to allow more storage
rate is 50 gigs per 5 dollars a month
IMO wasting money.
@narrow depot
try this;
Learn how to set up Helix Core on Azure in just a few clicks using our Azure template.
but isnt azure also paid?
i recently will be changing unis so i dont know if should proceed with a student account
Cool I ran it in CMD prompt
picking your source control to suit some cheap hardware is so horrifically backwards...
I don't care, it will be more than needed for my case ๐
are you even serious
Not including the cost of VM
Yes.
You can set up your own if you have 2 pcs.
going the route of azure devops anyways tho
no, i mean in terms of suggesting probably breaking microsoft's EULA and fringe-violating server rule 5
and yes, azure devops is free for small teams or similar BTW @narrow depot (I've never used it, just see it mentioned all the time)
You consider makin a new account piracy?
what do you think piracy is, if it isn't intentionally attempting to sidestep payment requirements lol
I have 4 microsoft accounts. Always had, always will have. Each one comes with the free service, that was given with each account.
well that could be fine if you have 3 business entities plus yourself and each business entity plus your personal entity have each received one free account
otherwise, I'm not going to waste time trying to read their fine print to discover where, but i assure you you're violating your terms with them
Have fun migrating your repos once a year :)
Someone making do with what they have is infinitely better than skipping it because they can't do it "right". Lots of indies, hobbyists and learners around.
I think he was talking specifically about choosing a vcs (or other software) that is less needy for hardware. I definitely agree with you and I'd rather choose some better software and suffer slowness from it until I can upgrade the hardware
It wasn't about suffering slowness though. The question was about what can run on a pi. P4 hasn't been supported on it in a long time. If they only have a pi to run their server on, why discourage them?
ok fine:
- if you're going to self-host your VCS locally, the only serious reason to run VCS on something like a pi is if you're working with a team and you don't want to leave your PC on 24/7 because of power bills or summer heat or something
- if someone is going to go all willy nilly and say "I'll just use whatever VCS I can, it really doesn't matter to me what it is" then ... I'm going to
deduce that they're not working on a team and the above is not applicable - so why run VCS on a pi, why limit yourself to something that you didn't actually want, if you wanted perforce just run it locally on your dev machine.
bonus points: if the pi can run either SVN or git -- you arbitrarily choose SVN? eh, I guess I can forgive this actually, every option has its glaring evils
that's the point you don't understand. I'm not running VCS locally. My internet subscription offer me a Virtual Machine online running 24/7 but on a arm64 (because it first purpose is for home automation). We are only 2 to collaborate on the Unreal Project, so source control will not be used overstrain. We'll mainly use it as an exchange repository. So yes, for me, using SVN on this arm arch is more than welcome. Why should I pay 10$+ a server if I don't need it ? ๐
SRombauts did I see correctly, Plastic has initial changelist support now?
Tying your project's VCS to your ISP sounds like the opposite of being clever to me
. Also would be curious how much storage they offer with it. But whatever, it's a free world ๐
Yes, Plastic SCM changelist support is merged! Please feel free to test ๐
I am working on version check and more robust error reporting, then update the doc, screenshots etc and a release
did unreal 5 do away with all the progress bars for source control? When I have to submit large changes it just freezes my engine until its done with no progress bar or notifications at all.
Is perforce server smart enough to create a virtual link or something when doing a move or does it duplicate the file and cost double the storage on the server?
Did a quick test on my own server, at least for binary files a simple copy doesn't seem to actually copy the underlying data so there's no waste of storage. I'd guess a move/integrate is the same unless it results in the file contents changing.
it definitely has a system that compares files and there's some "threshold" amount that if files appear to be very similar (and have other indicators, such as being the same filename) it will track it as a move but i don't know the details. it won't show up until after you actually commit the move, in the changelist it will look like it's duplicating it, it processes it further server side
this is why e.g. it's normally safe to both move source code files around while also fixing #include paths, it will try to realize "oh even though they're different and in a different folder these are actually still the same file", you don't have to split it into two changelists to move a file and then fix the paths
guess I'll measure the repo size , do the move and measure again
@reef oriole Hi,
How to use the PlasticSCM plugin in UE 5.1?
The thing is, when I install a plugin from the official repository, the engine crashes during workspace synchronization...
Someone was able to solve this problem?
https://github.com/PlasticSCM/UE4PlasticPlugin/releases/tag/1.5.1
I saw a message saying to update the one out of the box, but I couldn't find how to do it..
Does anyone have insight into whether Git will eventually be fully supported by UE source control such that I can diff BPs, Assets, etc while hooked up to Git?
Perforce is extremely annoying to use, coming from the background of Git.
However UE gives lots of errors when I try to let it know that I'm using a Git repository.
So far the only solution for me has been to treat all Blueprints, Assets etc like black boxes with no actual revision history, and it's super annoying.
UE basically converts assets to text when diffing with a Perforce backend, so I'm confused why it has a hard time doing the same with a Git backend.
Please and thanks for any insights any of you have on this.
The global Sync currently crash deep inside the engine since UE5; it's a known issue and the menu entry is even disabled on the master branch for now
Edit: so you have to do like with Perforce, close the Editor to sync your workspace from the regular GUI
The beta basic Git plugin that I developed in unreal Engine is doing exactly that (but no much more)
When I enable the default UE5 Git functionality, I get a ton of errors saying files aren't added to perforce, and I'm unable to diff the binaries. Is there some plugin I need to install that I don't have?
My entire project has full revision history in Git, I just can't convince unreal of that.
That's definitely messed up; the default git plugin provider shouldn't log errors about Perforce
"not in source control" yes, especially about all the Engine stuff if you use a binary editor installed with the launcher
Send me one log file from <project>/Saved/Logs so I can give it a look
Currently in Europe, it's late here, will do a fresh test tomorrow morning and send you the log. Thanks!
Same, I am in France ๐
not while it has pending changes in it like that one does
thanks, yeah. i somehow managed to discard pending changes. it had an asset in it which contained cyrillic letters, i see perforce doesnt seem to like that
https://github.com/ProjectBorealis/UEGitPlugin tried this?
(i make it)
in perforce binary files are stored in full, instead of a delta like text files. LFS is an extension for git that uses a pointer to the blob. does git update the binary file each time or just the pointer? not sure but perhaps why you're seeing issues...
how do i create a branch in perforce? i want to split from mainline to implement a feature but i cant really understand the perforce docs. ive seen that i can right click on a folder or some files and select branch files, but i can also create a new stream from mainline with the development type
@mighty light you'll want to look into stream branching. be aware that you can't lock binary assets across branches unless you register it (by editing the engine source)
thanks for that. is stream branching where i create a branch from mainline like this?
are you working on a team or solo?
team
branching (mainline, dev-*, release, hotfix) adds workflow overhead (tofu, merge down, copy up). if you're working solo (or on a small team) you might want to consider just dumping everthing into main
fyi perforce has some decent documentation on stream types, when to use which, and how https://www.perforce.com/manuals/p4guide/Content/P4Guide/streams.types.html
oh nice i didnt even see this
what does locking binaries do?
You want to lock binary files because it's not possible to merge them - multiple people cannot work on them at the same time.
But as they said, this isn't done across branches. If two branches modify the same file and you integrate one into another then you're choosing which one "wins".
In a studio setting this is generally solved by most binary content being worked on in mainline with any work done in satellite branches being primarily for code.
With the occasional release branch getting content changes for patches that immediately get integrated (copied) back to the main branch if possible or just manually replicated.
so if we arent submitting binaries to the depot/stream does this matter?
I'm not talking about executables and dlls
I'm talking about all binary content
uassets, umaps, etc
oooh
so is the locking thing for checking out files? like when you checkout a map or uasset it locks it so noone else can use it?
yes
Epic has a sample typemap here https://docs.unrealengine.com/5.0/en-US/using-perforce-as-source-control-for-unreal-engine/#p4typemap
the important part being the binary+l lines which say that the files matching those patterns are binary and lockable.
if you aren't already using a typemap you'll want to use something akin to that and then you'll need to apply the binary+l type to existing assets as the typemap only applies to new files.
Something like this:
p4 edit -t binary+l Content/....uasset
p4 edit -t binary+l Content/....umap
and then submit the default changelist.
pretty sure ive already set that up on the server. it just says <binary> in p4v but the ue editor tells me that i cant checkout a bp for example because its checked out by someone else
what does locking have to do with intergrating/merging though? arent the files unlocked once you submit a changelist?
It doesn't have anything to do with integrations
the warning was that locks only apply to the branch the file is checked out on
ohh so if i register the branch through engine source it will lock it across those registered branches?
no
it does warn you about other branches though iirc
you don't want locks to apply to multiple branches - that'd mean work in one branch blocks another. What you want is a warning that you're editing content that might stomp (or get stomped by) another branch if things get integrated.
i see
just out of curiousity, whats the solution when it comes to integration? if theres a map for example that has changes in both branches? do you manually go into the editor and merge the changes?
One branch stomps another.
You cannot merge most asset types - blueprints are an exception and merging is exceedingly painful.
ah
In general editing existing content is something you want to do in only a single branch (unless you're willing to lose work). New content doesn't matter since it won't conflict.
Following up to my issues using Git in UE5:
- My project is based on
LyraStarterGame - I structured it as is required by Lyra, where the main project is effectively treated like Engine code and is not to be modified
- My code is in
Plugins/GameFeatures/XistGameas required by Lyra - I also have a
Plugins/GameFeatures/XistCoreLyrareusable library that I intend to use for future games based on Lyra
Thus I am using Git Submodules for XistGame and XistCoreLyra.
It seems that this use of submodules causes the Git plugin to not work.
I tested today and if I modify the base Lyra code in the main Git repository I am indeed able to use the Git plugin to view changes, diff binary assets including blueprints and data assets.
However if I modify files in one of my git submodules (where I am effectively doing all of my work), the Git plugin basically ignores them. If I try to diff, I get a quick flash of a dialog box in UE that disappears before I can read it. I never see a diff. There are no error logs related to any operation that apparently failed. There is no indication that the files have been modified, it's as if the Git plugin cannot deal with submodules at all.
RE the secondary issue where I am getting the "file is not added to Perforce" errors, that seems to be coming from Lyra editor code, specifically in EditorValidator_SourceControl.cpp:
FSourceControlStatePtr DependencyState = SourceControlProvider.GetState(SourceControlHelpers::PackageFilename(DependencyStr), EStateCacheUsage::Use);
if (DependencyState.IsValid() && !DependencyState->IsSourceControlled())
{
AssetFails(InAsset, FText::Format(LOCTEXT("SourceControl_NotMarkedForAdd", "References {0} which is not marked for add in perforce"), FText::FromString(DependencyStr)), ValidationErrors);
}
This may be the same issue -- DependencyState->IsSourceControlled() is returning false for files that are indeed committed to the Git submodule.
yes, Git plugins are not working with submodules, sorry about that
I think some people tried to provide some support for that, you could have a look if some PR included that
Are there any plans to add support for submodules in the future?
I could perhaps restructure the project to force both of the plugins to exist in the same Git repo for now, but long term that would be a headache.
@reef oriole I searched through the public pull requests, I don't see much related to Git in there.
I also looked through Engine/Plugins/Developer/GitSourceControl and it seems like adding the capability to use submodules would be a significant amount of work.
I guess the most practical way for me to be able to use the editor's diff tools would be to restructure my repository such that many plugins are all in the same repo.
Are there any UE best practices related to maintaining and using multiple plugins in a project as far as source control goes?
Historically that is what I've used Git submodules for. ๐
ok no , so either its unreal source control or P4 that is incredibly stupid , I moved assets in editor with source control enabled , let unreal do its thing with checkout and stuff and once I submitted everything the repository pretty much doubled in size
You know what... I probably kind of dumbly misled you on that. What I said is true, but if the uasset file has even a single byte changed, perforce will obviously have to store the whole new file... Because that's just how it stores binary
And I'm guessing UE probably has to do some change to the file with a move
I meant on the plugin's Github;
https://github.com/SRombauts/UE4GitPlugin/pull/161 Submodule support
Feel free to test it if you know how and can, and please report how it works so I know if it's ready for integration
I don't have much time & energy left to do this sort of things for the git plugin (I work on the Plastic SCM one ๐ )
I read through the changes proposed in that PR. It seems like it may work in the case where all of the changes are in a single plugin which itself is a submodule.
I don't know the plugin well enough, or UE's usage of it, to determine whether it will work in the case where a file in the main repo is changed in addition to a file in the submodule.
Furthermore it is similarly unclear whether it will work with multiple submodules and multiple changes across them.
Unfortunately I'm currently on vacation and on a laptop, with a vanilla installed UE5, nothing custom here, and no real ability to try out engine plugin changes, so I can't very well test it.
For now I've just copied all the submodule files from their respective repos into the main project repo, which in the long run is absolutely NOT the way to work in Git, but for now works fine while I'm on vacation.
It's not an Engine plugin; you can just clone the plugin repo in a Plugins/UE4GitPlugin subfolder and it will be compiled as part of your project and override the one in Engine
Oh?
In that case sure I'll give it a shot.
Any config I need to do or just clone it into the Plugins folder?
You can just clone it if you already have some C++ code into your project, in order to recompile it
If you don't have a Source/ folder, but have Visual Studio installed, you just have to enable source code by, eg, using the Editor Wizard to add one empty C++ class to your project
OK I'll play with it some and let you know what I find out
@reef oriole I forked your repo and merged PR#161 into master. Is that the branch I should be testing from?
Or the unreal-5-support branch?
yes, sounds good to me
oh wait, right, you would have to merge into ue5
perhaps should you first give the ue5 branch a go, so you check that it seems to be working "at least as good as the one in engine"
it it works good enough, you can merge the submodule support branch and see if it helps
I created a SubmoduleSupport branch, same naming convention as used in the PR
I'll merge unreal-5-support into this branch and go from there
Then if it works at least you know it's clean on that branch
(I don't have UE4 installed on this laptop, cannot test that, I only use UE5)
PS FWIW I did git submodule add https://github.com/x157/UE4GitPlugin Plugins/UE4GitPlugin
rather than cloning and ignoring, I just added it as a submodule
what better way to test submodules !? ๐
you want to track assets in submodules inside Content/ no?
I track both C++ code and UE assets in submodules
(I'm new to UE5, but have many years experience with C++ and Git on big projects where submodules are required)
Gonna watch Wimbledon while I do a full recompile since I moved so much source around, will circle back to this later today or tomorrow morning and report my findings.
Thanks for your help! Hopefully this PR does the trick. ๐
"Because that's just how it stores binary"
Any intuitive reason on why ?
because diffing binaries is pointless and i think maybe really slow
pretty sure it's possible to make it treat binary files as text, but i don't know what the downsides would be
Vcs is sort of designed to store text files like source code (afaik it was originally designed for Linux source??). It doesn't store versions of every single file ever, instead it stores the diff/delta between versions. If you change a line of code, only that difference is stored instead of storing 2 versions of the file. This is awesome and let's you do merging and shit. Binary files on the other hand can not store a diff and you can't merge binaries so... You have to store both versions of the entire file
well, why can't you do a delta with binaries , atleast until its upto a certain threshold of size difference. I guess that's what hojo mentioned
If I give you 2 arbitrary lengths of bytes, can you tell me what their difference means?
Alphanumeric text is trivial to diff/merge. I don't really know much more about the reasoning maybe someone who knows more can provide a more technical answer. Long story short is: text good, binary bad
not arbritary , but upto a threshold you can look for matches . if the size change is large then skip it
I wasn't even following the conversation, I was just providing my cent on that specific comment
๐คท๐ป
i'm surprised that there wouldn't be a way around it but that perforce link specifies that if the binary file just happens to contain an end-of-file character then apparently all hell breaks loose lol
@reef oriole following up from earlier, PR#161 does not work.
Right clicking a file in a submodule and choosing a source control command is completely broken.
"Show History" doesn't work, "Diff to Depot" doesn't work. Nothing works.
Right clicking a file in the main git repo does work. I can see history and diff correctly.
I do notice however that there is no "Revert" option, which must be broken.
Instead of a "Revert" option there is a "Sync" option which is confusing in the context of Git. I'm not sure what "Sync" would mean for a single file.
I think, given this, for now I'll just combine all of my libraries into a single project repo. It's really painful to think of all the future merge headaches that will cause, but it seems to be the only way to get UE5 working with Git diffs.
Related question: Does Perforce support the concept of submodules? And if so does UE5 handle that well?
How are people who are using Perforce handling the situation where multiple shared plugins are required for multiple projects?
Surely people aren't just copying code all around like it's 1970?
Yeah people usually use monorepos. Honestly, submodules, with its static submodule commit pinning, can be a pain to maintain for change management.
UEGitPlugin 3.05 released!
https://github.com/ProjectBorealis/UEGitPlugin/releases/tag/3.05
Comes in with quite a few fixes, including some upstream from SRombauts!
Nice! Happy if it can be useful ๐
I hope that I can find some more free time to improve it further
Thanks for your tests and reports
I will perhaps get some time this summer to look into this
Hi, is it safe to add the Binaries and Intermediate folders in a Plugin to gitignore?
don't include intermediate, binaries are optional and situational
(thats from epic docs)
For the main project yes, but I meant for plugins specifically. But I guess they follow similar rules?
Yeah plugins do also, you can see in the unreal git ignore that they are ignored by default anyway. The non highlighted get generated per user
ah I see, thank you! I'm using a different gitignore, does unreal automatically create a default gitignore now?
cheers! No it doesn't, that's just githubs official gitignore, some things like azure devops and source tree have drop downs letting you initialize a repo and automatically add a gitignore from githubs official list
https://github.com/github/gitignore/blob/main/UnrealEngine.gitignore
If you do, and you want a tester, send me a DM. I'll be happy to help. I think Git submodules are extremely important to reducing developer merge headache overhead for anyone working on more than 1 project at a time.
Hello guys, I'm wondering what is the client for perforce in rider?
Also binaries is relative. We for example check in the dlls, but not the pdbs
It's workspace
oh ok tks! ๐
lol Build should not be ignored
then don't ignore it
Cool thanks I don't
No problem, every situation is different, just because you do something another way doesn't mean you, a random user, should come out of nowhere and suggest otherwise with no reason. I'm just passing along what's both there, and in the p4 ue docs
It isn't user specific
Build isn't supposed to be ignored, it typically contains build configuration information for specific platforms, as well as things like icons
It contains no intermediate files
If you re look at that git ignore screenshot, you can see those things are not being ignored. Both git (when initializing with GitHubโs gitignore) and p4 are set to do this by default
github's gitignores aren't "official". The Build directory ignore seems to have been contributed by some random community member, probably because some people like to have that directory as a target for packaged output or something but it's not standard in any way.
It's certainly not used by unreal to store anything that should be ignored.
I can't even find an example p4ignore from any sort of official source that includes the line about the build directory. perforce themselves show a painfully underbaked p4ignore here: https://www.perforce.com/products/helix-core/configure-helix-core-game-engine#tab-panel-76014 and I can't even find an example in any unreal documentation.
doesn't help that the screenshot 7801 linked, which shows a Build folder and by nature suggests to exclude it, is straight from official epic docs 
Is it? I couldn't find any example ignores in the docs.
ohh that screenshot, nvm. Yeah that screenshot is demonstrably wrong (or at least super out of date given the 2014 dates on the files...) by the fact that it tells you to ignore the Build directory entirely.
having a strange error after moving to perforce when working with the sln and cpp files, this is what happens when trying to rebuild inside vs2022
||2>UnrealBuildTool : error : Could not find definition for module 'MeshMorpherEditor', (referenced via PP.uproject -> MeshMorpher.uplugin)
2>D:\Program Files\VS2022\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(50,5): error MSB3073: The command "E:\Unreal\UE_5.0\Engine\Build\BatchFiles\Rebuild.bat PPEditor Win64 Development -Project="F:\ProjectP\ProjectP\PP.uproject" -WaitMutex -FromMsBuild" exited with code -1.
2>Done building project "PP.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 1 skipped ==========||
th person im sharing the project with through perforce seems to have no issues though
you don't have whatever that plugin is
or are missing files from it
I'm guessing it's this? https://www.unrealengine.com/marketplace/en-US/product/mesh-morpher
They might have the plugin installed to the engine instead of to the project which is why they don't have problems.
hmm, I see
Does somebody know how I can set the policy on a specific file in p4 so it only stores the latest version on the server and not all revisions?
Hi, im using Github for my SC, me and my friend keep having an issue where certain changes aren't being pushed, for example he changed the material of a wall among other changes and then pushed the file, ive pulled the file and for me the textures on the wall are grey squares, why would some changes be pushed and some aren't? this seems to happen every so often with textures where he'll make a change but it breaks it for me?
TBH external Git tools are way better for visualizing the state of the Git repo and the local revisions than the Editor.
Consider using an external Git tool. You can still do most work in the editor, but it will make it painfully obvious what you've pushed, what you haven't, and when there are updates you need to pull down.
GitKraken is good, though it's paid. Not sure what the best free visual tool is ATM.
You can set it in the typemap, but for existing files you right click it, change filetype, and then it's in there
The code is like +s2 or something
Oh it was that easy thanks :). Thought I have to do some cmd magic
In perforce is it normal to use development streams as branches the same as you would use branches in git? Eg for all feature implementations and bug fixes that are more than a single commit worth then merge/delete the stream when it's done? Or do you have a single development stream where all the features and bug fixes go and they just keep getting merged?
You can do it on all exes for instance in the typemap if on the command line you type "p4 typemap", but no, individual files is all gui
I can only speak for a few studios I've worked at, but trunk based development is more common in my experience. The key problem with branching is merging binary files.
Epic seems to use a branch per department though if you've ever seen their p4. They have Dev-rendering etc as branches and they merge those
I've heard of some teams keeping code on git for branching, and the rest of the project on p4, but I've yet to understand how they handle bp and it's close relationship with C++ on projects of any scale
Trunk based is working in main right? As for binaries, based on what siliex told me the solution is that the dev branch would probably introduce its own binaries which can be manually merged later on (eg its own levels, player controller BP, etc). For dll and exe it's not a problem for me specifically because of UGS
Pretty much working in main, yeah.
So how do you handle merging levels and player bps?
Binaries I meant binary files, not just executables/ compiled artifacts
I guess they would be done manually in main. A branch might submit a new level to demo a feature then someone would have to go to the main level for the game and manually implement it
It usually ends up as some dodgy stomping step
Right
My current issue is that I have incomplete implementations of stuff and people want to test it and I don't know what to do. I don't particularly like the idea of just zipping it up and sending it over, I'd prefer to version it and give everyone access
Yes. That's why it's called "version control" :P
Yeah I think it's just one of those things that there is no "right way"
Even google uses trunk based development
Git style branching works well in more code focused projects, but gets complicated in game Dev where so many binary files are involved. Complicated even further by the blurry line BPs introduce between code and binary files
It's not impossible, but you need to spend more time merging, and have more defined rules about where teams will work and which files are likely to be stomped during merges
Ah ok
So if we do trunk based dev, what happens with large feature implementations? Do you use a shared branch (eg your department branch) and hope noone else is using it?
Branching is exceedingly common for prepping demos, release patches etc etc
There's a few approaches. Epic seems to so that and merge in, I'd guess stomping changes. Another option that is common is have a feature switch. So if you are changing the player controller for instance you don't break the old one, you copy it and start building up the new one, and people at any point can choose to use the legacy or new one, etc
The details of how to handle that ofcourse depend on exactly what is changing and how big it is. And also where in the development cycle you are
Sounds... Confusing :'(
Welcome to development!
Everything's a trade off, and there's not always a clear right or wrong answer
Thanks for explaining it though. Maybe we can have a dev stream for the bigger stuff.
I'd guess you should look at what your objectives are. If you have a Dev branch, what's your main branch for? Typically main is development
You'd branch off for more stability, eg prepping a release or demo
Oh
I thought the entire point of the development stream type was for "less stable than main".. Development
Yeah that's p4 terminology, confisingly imo. My point is that you want to work out your development objectives and demands and then choose the appropriate branch type from there. Decoupling p4 terminology from your teams and projects needs I suppose.
Branching strategy should be more focused on and based around your teams workflows imo
๐ตโ๐ซ Maybe we can just stick to trunk based for now. Seems way easier especially given out team size
How big?
But yeah, in my experience you can fuck up branching strategy and cause major headaches if you get it wrong
Hey, I have released version 1.6.0 of the Plastic SCM plugin for Unreal Engine 5, with support for the new Changelists UI ๐
https://github.com/PlasticSCM/UE4PlasticPlugin/releases/tag/1.6.0
Please let me know how it runs for you, but it's very solid in my experience!
Cheers!
Nice. Now I have more than enough reasons to upgrade the plugin
- I know that's probably not big enough to consider but I wanted to know the best practice.
That's not what I was getting at. Smaller projects/teams are a bit better to experiment on as the risk is significantly lower than a 50 person team. So go nuts.
that's what the Developer folder is for. you can also shelve files in p4
oh thats sick. it mentions source control so im guessing these get submitted?
i guess its hidden by default. i went to the content browser settings and selected Show Developers Content. it now shows Developers but its in the Content foler and not the root folder like it shows in the docs page
to make things easier, we pushed a DefaultEditorSettings.ini with the settings in
DisplayPluginFolders=True
DisplayDevelopersFolder=True```
Q: Are there any solutions that folks use for plaintext diffing of UE Blueprints? I know that nodes can be copied and pasted as plaintext (e.g. how blueprintue.com ingests new blueprints), but I'm curious if anyone is using this to - for example - automatically create plaintext Blueprint records before checking them in to source control
There was a commandlet I was interested in exploring a few years ago that either diffed or exported as text. Can't remember exsct details. Look through all the commandlets though, there might be one of use. I suspect one issue will be nodes not exporting in the same order and tripping up a normal text diffing tool. You can. Ofcourse diff bp through the editor, but yeah sometimes you just want to do it from p4v
Hi, I hope you are well
I have some problems with Perforce and neither official documentations nor google has helped me so far.
My aim is to share an Unreal 5.0.2 project with a colleague that will provide the art, I have to code
I followed many tutorials and ended up with a typemap like this:
binary+w //....exe
binary+w //....dll
binary+w //....lib
binary+w //....app
etc...```
and a .p4ignore like this (attached)
I ignore directories such as .idea, Config, DerivedDataCache, Intermediate and Saved with other things
Right now what my stream shows is this structure:
.p4ignore
MyProject\Binaries
MyProject\Config
MyProject\Content
MyProject\Plugins (containing RiderLink)
MyProject\Source
MyProject\MyProject.uproject```
The problem is, the artist tried downloading the project but the Unreal Engine Explorer doesn't show the C++ classes I coded
I tried rebuilding the VS project in his computer but it didn't solve the issue
Can anyone help me see what I'm doing wrong?
Which configuration did you build in?
Do you mean the engine version?
Unreal Engine 5.0.2
(I edited the original post)
No. Debug Editor, Development, etc.
Development Editor | Win64
No, only my computer
The artist just downloaded the depot and ran the .uproject file
So you are running a source build?
I rebuilded the editor and submitted in the depot
He downloaded and executed the project
Does it helps?
Don't build in the editor.
No, I built in Rider
Ah.
I'm worried I just ignored the wrong file, like all the .idea directory
You shouldn't need that.
As long as he has all the files in the binaries folder, it should be good.
included the .pdb?
in all the .p4ignore I found it is ignored
great, now I'm back at the beginning ๐
@karmic pivot What do you mean it doesn't show the C++ classes?
The Public directory is not shown in the Content Browser in the artist project, even if it is there locally
This is a screen from my PC
Do they have it configured to show it?
In settings, on the top right side of the content browser, click on it and make sure "Show C++ Classes" is enabled.
Yep, it is enabled
I didn't know of this setting tho
Sorry, I wasn't clear enough
It is enabled in the artist machine
Can you have them show the public folder on their file explorer?
I tried copying my project directory on a USB and pasting it in his computer, and the Public directory is shown in the second project (the one coming from my PC unfiltered, with all the directories).
Left copied project, Right Perforce depot
one sec
I'm not overall comfortable with P4, so there might be some update shenanigans that you need to do.
it is possible (???) that the info displayed in there is pulled from the solution file or something and the artist doesn't have it. this is a super wild stab in the dark. the real question is, if the artist starts to make a new blueprint, can they pick all of your parent classes that you've been making? this c++ folder view is useless and nobody uses it normally
As long as they can actually use the class in the new class window - that's all that really matters
the class is present in the File Explorer
gimme a sec now I check if it is present in the new Class
but even if it works, I will force him to make a new class just to use one of mine, it is an unnecessary step to me
I don't understand the last statement. They shouldn't even be in the C++ section, no? That's your task. They should only be concerned with creating new BP's
i'm not sure what you mean by that. all i'm asking is, are the classes that you made in your Public folder usable by them or not (we haven't actually seen inside of your Public folder yet but i'm assuming you have more classes in there)
(Or DT's/DA's)
I have just one test class
It shows in my PC when I create a blueprint
Not in the artist one
(left) My project (in a USB temporarily)
(right) the depot in the artist PC
There are obvious differences, do you spot absences in the artist one that I have wrongly included in my p4ignore file?
In reality the depot doesn't have directories such as DerivedDataCache, they were probably auto regenerated in the artist PC
So the source file itself is not in the depot?
what file explorer app is that?
this is the real depot
This is P4V perforce
Total Commander, a fantastic explorer for Windows
oh ok, was making sure we weren't doing something weird with linux or something
lol
as you can see there are no Intermediate and other directories
am I wrong in excluding them?
@woven sluice at the start of this conversation there is a big message of mine with the p4ignore if y are interested
i think things look fine, i would have to hope the artist just isn't getting the updated files for some reason. if they have visual studio locally then they should be able to erase the binaries folder entirely and run a build in VS locally as a test
let me try it
it may take a while...
nope, rebuilding the project on the artist PC is not feasible
I'm 6 of 91 processes in more than 10 minutes, it will take at least an hour to finish
I will try another route, I will put into his project pieces of mine to pinpoint which one was needed to make everything works
I hope it is not a process too long.
yikes, an hour to build a new nearly empty project? is their rig even going to be powerful enough to do dev at all?
Something is definitely fishy.
I'm testing this on a laptop, because I don't have the artist PC on hand right now
I referred to the "artist pc" because I'm simulating what will happen when I give him access to the repository with another PC
(If it's not hardware related)
ah, ok then
really not, this is just a Rider-built 5.0.2 fresh Third Person Unreal Engine project with a test C++ class, saved in a local Perforce server ๐คทโโ๏ธ
nothing special
I'm sure is just an error in my server/depot configuration, it is just that you can't find a clear answer on how to do this even in the official Unreal Engine documentation, I had to scramble together a solution from different sources
I'm saying it's fishy if it takes an hour to build practically an empty project
I haven't optimized this old laptop, I just revived it it for this testing
it's fine if it's an old laptop, probably slow, HDD. nothing fishy there
the most obvious possibility is very simply that you didn't actually submit the new dll binaries after adding your new test class and building, but i don't want to sound like i'm treating you as that incompetent lol
even if it is, no offence taken
Oh - that's why I also included this comment: #source-control message
It was the Binaries..............
BUT... before you hang me for my sins (which I deserve) let me try to blame (even if partially) something else for my error
following the official Unreal Engine Perforce documentation I set-upped my typemap like this:
binary+w //....dll
(I removed the "depot" part)
and I quote this time the Perforce Unreal Engine official tutorial, which suggested the same approach:
Note that the server typemap we setup before allows coders to compile binaries without them being set to be Read-Only by Helix Core
A problem I had before when my typemap was different
So when I built my project only the newly created classes where missing from the depot and the edited Binaries didn't appear to be changed in the Perforce Client, nor I could (and I still can't) submit them. So I had no idea that was the case.
Now, this is just a part of the blame, as a coder I should had thought about that and I'm pretty ashamed for this error ๐
BUT, now that I know where is the problem, I ask you to be so kind and bare me a bit longer to help me figure out a solution, pretty please ๐ฅบ
Well... I go eat my dinner and then I will take a walk outside, hopefully when I return the mind will be refreshed and ready to solve the problem ๐
Thx anyway for the help, I really appreciate it ๐
man the perforce plugin for visual studio is really something else
it has lots of features, looks like shit, and locks up the main thread. What more could you ask for?
Lol
how about not spamming me with about 20 error boxes when my connection times out and i have to log back in
sounds like a great feature
so im currently having an issue with p4v adding ignored files to the changelist if i click on my root project folder and mark it for add. i get dlls and intermediate folder stuff added. i have my p4config set to the proper ignore file but i dont know how to check in p4v if its actually being used correctly
https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_ignores.html
for example:
p4 ignores -i -v C://test/test.dll
Hi guys, does everyone use perforce for source control? Is it something like you store all of your project files on this server?
is it free to use or you have to pay! although they have some pricing there
Free for the first 5 users, but it quickly gets pricey, but not that bad for a company in the grand scheme of things
It's been one of the best options for versioning large binary files for a long time, so there's lots of familiarity with it, and lots of very stable integrations
Yes every time you make a change or complete a set of work you submit your changes, and then you can see what changed over time, roll back bad changes, etc etc
Also syncs files between team members etc
Hi, I appreciate your answer but as I said there is already an ignore file and the files being added are definitely ignored
I see. Seems it's very important when working on a project. How many GB it can store? Does mostly game dev try to save their code on it or whole project files, any suggestions on that
How many GB it can store
how big is your hard drive
Do you actually mean you have your p4config set to a valid config file name and you have your p4ignore set to a valid ignore file name inside of said config file?
As big as your servers storage. And generally you want to submit as much as you can. Unreal project, source art files, etc etc
submit all the files that go into the creation of the project. this includes DCC project files, exports, concept art, design docs, and of course, Unreal assets. you want to maintain a history of development for everything that funnels into the final product
1 Tb ssd
Honestly I never used it before, but plan to do that by using Perforce then to keep project on it. Seems their is no storage limit to keep game project contents in it
yep. i opened a windows terminal in the project folder and did p4 set and its saying the config and ignore are both set to the correct things
I'm not sure what takes precedence if you have both... You might want to try unsetting the ignore
I mean perforce might be looking for ignore settings both from environment variables and from inside the config
hm i dont have ignore set as an env-var, only in the config
since p4 set is showing the ignore is set from the config file, id guess its using it but it doesnt say if its in-use, only that its set
Ooh I didn't realize p4 set showed variables from the local config file too.
Are you certain that the ignored files aren't simply already in your depot?...
Also, you are looking at p4 set output while in the project folder not elsewhere right?
Or I guess p4 set is supposed to tell you where each value is coming from - you clarified that already, ok
positive. they were once, but they have been deleted and added to the ignore
yep thats right. im assuming p4v would also have the same info but.. it doesnt exactly have an exhaustive env-var list in connection -> environment settings
I know this is not your specific issue, but there's a cmd: 'p4 ignores' that can help debug why a file was ignored. Might give some clues if you try it on a few files.
are there any folders i should be ignoring besides Binaries, Build, Intermediate, and Saved?
for a c++ project
yeah i have !Build/**/*.ico
Ignore deriveddatacache if it's in your project folder
i found this, anything else you'd change?
https://github.com/github/gitignore/blob/main/UnrealEngine.gitignore
Looks good but I store the most recent few versions of binaries
Dunno if you can do that with lfs though
why would i ignore my .sln file?
dont i need that to build the project on a new pc?
or is that built from the uproject file
You ignore anything that can be generated basically
SLN can be generated with 1 button press and also stores paths which are likely invalid for other devs on your team, so they'll need to regenerate anyway
The uproject is the important one
ah gotcha that makes sense
We are using perforce + UGS. For some reason, UGS pulls binaries every single time for one of our artists, even when the binaries have not been updated. Does anyone have any suggestions on diagnosing/fixing this?
use a p4ignore file
This video demonstrates how to prevent certain kinds of files from ending up in your Perforce Helix depot. The trick is to set the P4IGNORE variable properly on your workstation and then create .p4ignore files to describe which files to filter out. The video demonstrates how this integrates nicely with P4V.
Tbh I just assumed that was how it works. Our setup also does this.
For everyone in the office it's ok as we have a proxy, but for remote workers it's a bit annoying.
Why is SVN such a pain in the ass?
Anybody aware of this error? I can't get to understand what is it
Very quick Google suggests that unreal does not support your svn version
Yah, I've realized that, but can't find an older version :\
Is the server on windows or Linux?
Windows. I've managed to create an older version by command line
IT now says Does not exist :\
This
Not sure if I can help you much further. Googling the error is probably your best bet, also searching for how to downgrade an svn repo. My replies were based on about 5 minutes of Google
don't worry. Actually, thank you for helping ๐
I've managed to make a repository with an older version
I did it ๐
UGS pulling down binaries is intentional, it's just annoying that it's getting it even when they are unchanged.
ah my bad
Hmm. Maybe everyone else just has a fast enough connection to not be annoyed. I don't use it since I am a programmer and build from source. But other people seemed to be saying it didn't always pull for them :/
No worries. Thanks for the reply
Most of my team are based in an office and I setup a p4 proxy for them so it's super fast
I have one guy in another continent and it's slow for him
We have a lot of remote people and 500mb definitely isn't trivial for some people's home connection.
Yeah I get ya, unless anyone tells you otherwise though I assume that's just how it works
Bad news, but good to know at least
workflow wise they might prefer to setup an automatic sync for an hour before they usually start work and try and minimize the number of times they update during the day
UGS has an option to use automated sync
that's brutal, glad you mentioned it (my [tiny] team is not using UGS, we just let CI submit binaries and let perforce keep artists up to date fully naturally, have been wondering if I should bother setting up UGS but now this is a tick against taking the effort ๐ )
yeah we worked like that for a long time, we only switched to UGS because it simplified getting engine updates and facilitated making engine changes
although we keep those to a minimum ๐
A lot of times they are just pulling content they need to work on an asset, but then it's annoying to always be pulling exes. They could use p4 directly I guess, but that has the risk of putting them ahead of changes that require code to be built (and general workflow confusion)
Yeah, it would be ideal if it only synced binaries if they changed, and tbh that's how I EXPECTED it to work and I was surprised when it didn't
being completely ignorant of UGS I'm curious how UGS would simplify engine updates beyond just doing the same with perforce/CI/binaries. I always thought the only serious benefit of it would be the abilities to flag certain builds as good/bad and making it easier to "travel" up and down the changelists or something, and some other niceties like that
We have the source to it I guess, but do I have the time/energy to try to add that feature?
aint nobody got time for that
Well, we were using an installed build workflow before that so everytime we wanted to update engine we'd need to build the entire thing on a buildmachine, zip it and deploy it to the team. Add to that after switching to UE5 some stuff just doesn't work in Installed build (Bridge plugin, Gauntlet) and we deided to switch
my poor little build machine was taking almost 36 hours to build the full installed build and zip it up ๐
If you're using launcher Unreal distribution then project binaries in Perforce is the way to go
if you need to build engine from source, then IMO for Unreal 5 you should use UGS rather than installed build
oof 36 hours. thanks for the info, I guess I still don't see the extra benefit on this aspect. Maybe I'd just need to try it to learn what UGS does. I would be curious to simply try putting the engine alongside the project and run the exact same workflow I have now - any commits containing code changes trigger a CI build, CI scans the whole project and submits any changed binaries files. artists get latest and would naturally get the new binaries (engine and project). I guess UGS might store the built engine binaries outside of source control so that might be a factor?
Yes for UGS there's a separate P4 stream for binaries
So devs don't have to pull them or deal with custom local ignores
I think if you did that you'd probably find that each commit would generate 500mb+ of binary changes anyway so it wouldn't save you on that front. UGS stores the binaries in a zipped bundle in a separate depot, linked by CL in the name.
To be honest I don't see much advantage to UGS for us compared to binaries in perforce, but we're a small team and we've not setup the metadata server. On a bigger team I imagine knowing if builds are good or bad in the same place you're syncing could be useful.
There's some advantage in that if you make content changes that are dependent on code changes you are also making, that no one will get the content before the CI is done publishing the code that works with it.
Of course that's not a super common problem
devs don't have to deal with managing seperate streams or custom local ignores without UGS
oh yeah, that's another benefit that makes definite sense - preventing people from pulling blueprints without the DLLs which are coming in a while (we just use a discord bot that posts when builds are starting & done)
ah well, thanks for the info both - not sure what I'll do yet, looking to upgrade our setup a little bit this fall one way or another ๐
UGS was quite straightforward to setup tbh
I think most of the annoyance for us is that we use jenkins and scripting builds in there is annoying, especially given how long you have to wait to test it each time.
yeah our team is 100% remote so i'm irked by this new knowledge that UGS is going to pull all the binaries every update, it's the 3 minute waits that actually kill an hour of your day sometimes
Our incremental builds to push new binaries are usually about 3min. It's a lot longer if for some reason we need to force a rebuild, but thankfully that's rare.
Yeah I am getting more tempted to go look at the UGS source ๐
yeah right now if my guys mess up a tiny C++ commit then once a coder pushes the fix, CI builds, artists twiddle their thumbs for a couple minutes waiting for the go message, get the new DLLs and keep running in less than 5 minutes total for everything usually. if UGS makes them re-download several hundred MB extra then i worry this could double or quadruple
Hey everyone. I just shifted to Plastic SCM, pretty good in there and feeling fine with its setup. I just noticed something I never had to ignore before. Wanted to see if someone more knowledgeable than I could point me if I am cool to add a folder to the ignore list. I noticed on load of UE5 the Plastic SCM is constantly wanting to commit from the Script folder. I have never messed with that folder, its always empty so figured its just a spot to load and unload stuff in the backend. I am new to source control so I never worried about this stuff....sadly been the lazy winrar and forget about it type but now trying to be a little more tactful on my first real dive at solo development. Anyways long question short, is it cool to add that folder to my list of IGNORE folders in Plastic SCM. I see it does typings as pending commits, I doubt that needs to be tracked on my stuff lol.
hey everyone, using p4v, i made a new project in unreal and i want to send the whole thing(save the intermediate/saved folder) into my depot. How do i go about adding new projects? (my old one i used the wizard so it was easy, but new one just marking folders to add doesnt seem to be adding much
Are you using a p4ignore?
Also curious why you want the saved folder and Co committed? I guess if you want to sync it between computers it could work
oh sorry i dont want the saved or intermediate
i have the p4 ignore.txt in the folder yes
i forgot if there was any other thing i need to make the p4 ignore to work or not
You need P4IGNORE set, or have it set in yourbP4CONFIG
i remember i did that in the command line
do i need to do it every time in a new folder/project?
Yep
do you know where i can find the instructions for the command?
So P4IGNORE and P4CONFIG are file names, not locations (maybe it supports locations?) which are relative to your workspace root
Are you on windows?
yes
You can set these as environment variables or you can just open powershell/terminal and do p4 set P4IGNORE=p4ignore.txt
And it will look for p4ignore.txt in your workspace root
Same thing with P4CONFIG
i do have p4ignore in the root of the workspace
i think thats the one i set
(was like half a year ago, i dont remember exactly what i did..but i remember it was in a command line
You can check what's going on by running p4 set
Helps if your cwd for the shell is your workspace root
thanks for the help. i'll have to come back later. its super late here my wife wants to kill me ๐
what is ue4 adaptive unity build.
Don't cross post ๐ฆ
Did you end up getting this sorted out?
Greetings! Quick question. For a function that modifies assets in runtime and in editor (sound assets, specifically), which source control function should I be calling after each modification? Would a simple "CheckOut" do the trick?
Are you sure you can modify assets at runtime or use the integrated source control?
You aren't allowed to build editor modules into your runtime code.
I think they mean in the editor.
And it isn't necessary to interact with source control directly, just call Modify on the package. That'll let the user save the asset (either manually or via save all) which will prompt for checkout if necessary.
Well they said modify assets at runtime and in the editor...
i will hope nobody is shipping perforce integration into their game when it launches on Steam. surely they simply meant runtime as in during PIE ๐
I would never assume when planning to do that would cause them months of lost time!
"note: 6 player coop requires paying Perforce Inc. $3000 per year" 
oof, misread what they said.
yeah, uh, don't do this
Sorry, got working and just now I'm seeing the replies
Yup, indeed I meant in PIE, not in shipping ๐
More specifically, working on an audio mixing asset to be used in PIE
So you can adjust your mix while playtesting, and when you go back to editor, the right assets should be marked as to be updated to source control
Yeah that just involves calling Modify on the package which tells the editor the asset needs to be saved. No reason to interact with source control directly.
Thanks.
And when I'm creating a new asset, the newly created asset has the question mark saying it's not in depot
Would that be expected behaviour? (I'm still quite new to source control, but I'm trying to understand it a bit so it won't interfere with my asset)
That's expected
Simply saving the asset should add it.
The workflow for the editor is that source control operations don't happen until you save - that way you can experiment and tweak things without checking out assets.
It also means that anything you write that involves modifying assets doesn't have to know anything about source control - it can modify the assets in-memory and the editor will figure out the source control bits later when the user saves.
Good to know!
Although I just tried manually saving my new file, and I'm getting this error ๐ค
So I'm guessing I still have to check out somewhere in my function?
And after clicking close, I get this
The problem is that the asset is writeable for some reason without having been checked out.
You should not be writing the file yourself - you should be letting the editor do that when you save.
All your code should do is make whatever changes necessary to the objects the asset contains and then call Modify to let the editor know you made changes.
I tried avoiding it as much as possible, but I need to be able to create new assets during PIE
Which was a PITA on its own and took me a few days to figure out the factory stuff
But I'm almost there, this is the last problem I seem to be having
These are source effects by the way. I'm trying to do the equivalent of just hitting right click on the content browser and creating a new source effect asset. I just need to do it programatically from within PIE
I'm currently trying this at the end of my function but without any luck (that's what gets me the above warnings):
USourceControlHelpers* SourceControl = nullptr;
SourceControl->CheckOutFile(SoundEffect->GetName());
Creating new assets is not the same as writing a file yourself.
When you create an asset (including via a factory) you're not actually writing anything to disk. You're just creating an asset in memory which isn't actually written to disk until the user hits save.
Again, you shouldn't have to interact with source control from your code whatsoever if you're creating assets the way the editor expects.
If you right click in the content browser and create a new material, you'll find that the file doesn't actually exist on disk if you find the path in file explorer.
At least not until you hit save.
If the file is being written somehow as a result of your code running then you're doing something wrong - it should only get written once the user hits save.
That's a good point. In that case then I guess I might be trying to break the "usual expected behaviour" rule
Because after a mixing session with my asset you might have created 20 different assets in different directories
There's a "save all" button
And I don't want to have the user manually hunt them down
or Ctrl+Shift+S
That's a good point, although in that case I might be forcing the user to save changes to other assets... it's a bit of a tricky situation ๐ค
They can select what to save in the dialog that comes up.
And what to add/checkout/etc
I'd start by doing things the expected way and making sure it works first
if after getting it to work you still want to change the workflow, then look at how to trigger the normal save action rather than doing things yourself.
That was actually my final question. Still trying to wrap my head around how source control works, but I need a solution that works both with and without source control, since it will be a marketplace assets, so all types of users
that's what the normal save action would handle. You still wouldn't touch source control yourself - the editor knows what it has to do
In that case, I should be looking at the standard save function? Or checkout? Or save for non-source control projects and checkout for source control projects?
Ohh ok, I see
That's what I'm trying to do actually, the usual normal save action, or at least the closest one I could find (UPackage::SavePackage)
But that's what gets me those error messages from above
Maybe I should just mark them as dirty?
found it
FEditorFileUtils::PromptForCheckoutAndSave
that'll give you the standard checkout/save dialogs (if necessary)
You are an absolute life saver! Thanks a ton!! ๐
wow, this method is actually well documented
/**
* Optionally prompts the user for which of the provided packages should be saved, and then additionally prompts the user to check-out any of
* the provided packages which are under source control. If the user cancels their way out of either dialog, no packages are saved. It is possible the user
* will be prompted again, if the saving process fails for any reason. In that case, the user will be prompted on a package-by-package basis, allowing them
* to retry saving, skip trying to save the current package, or to again cancel out of the entire dialog. If the user skips saving a package that failed to save,
* the package will be added to the optional OutFailedPackages array, and execution will continue. After all packages are saved (or not), the user is provided with
* a warning about any packages that were writable on disk but not in source control, as well as a warning about which packages failed to save.
*
* @param PackagesToSave The list of packages to save. Both map and content packages are supported
* @param bCheckDirty If true, only packages that are dirty in PackagesToSave will be saved
* @param bPromptToSave If true the user will be prompted with a list of packages to save, otherwise all passed in packages are saved
* @param Title If bPromptToSave true provides a dialog title
* @param Message If bPromptToSave true provides a dialog message
* @param OutFailedPackages [out] If specified, will be filled in with all of the packages that failed to save successfully
* @param bAlreadyCheckedOut If true, the user will not be prompted with the source control dialog
* @param bCanBeDeclined If true, offer a "Don't Save" option in addition to "Cancel", which will not result in a cancellation return code.
*
* @return An enum value signifying success, failure, user declined, or cancellation. If any packages at all failed to save during execution, the return code will be
* failure, even if other packages successfully saved. If the user cancels at any point during any prompt, the return code will be cancellation, even though it
* is possible some packages have been successfully saved (if the cancel comes on a later package that can't be saved for some reason). If the user opts the "Don't
* Save" option on the dialog, the return code will indicate the user has declined out of the prompt. This way calling code can distinguish between a decline and a cancel
* and then proceed as planned, or abort its operation accordingly.
*/
That's gold! Thank you!!
Can I have a github repository for just a plugin and not the whole ue4 project 
you can have a github repository for whatever you want
With the push/pull that is integrated into unreal working nicely?
I'm about to reach a point where I can continue most of the development with Blueprints and I'll have to collab with some artists soon. C++ updates will be lesser than usual and I don't want to force artists to compile the project on initial start. Can I keep the source files and still update other people's rocket builds? Is this possible? And is sending binaries folder dangerous? If I only send it per week can it bloat the bandwith limit?
I looked at the pinned message for Cloud options, but thats from 2017. Just curious, are there any free options? even if it's very low spec?
does perforce support "hunks" like git does? like if i have multiple changes to a file git (or rather a git gui) could let me select which lines/hunks i want to commit and it will omit the rest from the commit but preserve the changes
not really AFAIK. You can shelve your changes, then in your diff tool revert the lines you don't want. Commit that, and then unshelve your original file. It works, accomplishes the same thing, but is a more fiddly workflow
Is there a way I can see assets that have a source control question mark?
Ah you can filter by Not Source Controlled
how can i reset source control for "git (beta)" so that i can reenter a new server?
If you mean in the editor then you should be able to set it to not use source control then change it to use git and it should prompt you for new credentials
I already use git and when i set it to git again the old server and stuff is still registered
Manually change the git remotes then?
Hi there, I recently started using p4 and noticed that when I import new assets in my project, they are not "seen" by source control until I actually open the folder that contains them. E.g. if I import some textures, never open the folder that contains them and I try to "Mark for add" the whole Content folder, the textures will not be marked. If I open the folder before using "mark for add" on the Content folder, it works fine and the textures will show up in source control. Is that expected behaviour? I would much rather have p4 automatically submitting all new assets to source control, even if I do not modify/open/see them.
Once you import you need to save them. The act of saving should add them to source control.
Doing Save All should do it too
Thanks for the reply; I am pretty sure that saving all is not working in my setup (i.e. if I save all > submit, the imported assets will not show up in the depot) so I may have misconfigured something if that is not expected behaviour.
Yeah, to be fair I've also seen this but not really got to the bottom of it, sometimes it works, sometimes it doesn't catch them all. I always use P4V to double check what is being submitted and manually add missing things.
If you didn't fix this already, you can edit .git/config with a text editor and change the info in there to point to the new origin URL. You can also modify your name/email to be associated with your commits in that file.
Anyone know how to fix insane lag on git desktop its not eating at my memory and even after disabling antivirus it doesnt stop lagging
Hi all, my team is using Plastic and someone forgot to release their locked files before leaving for vacation. Is there a way I can override their checkout?
Phone them, shout very loudly until they go home and fix it.
Lol
For anyone reading this in future, use command cm listlocks and then cm unlock <GUID of locked file>
for people in small/medium (or big!) teams: what does your code review process with perforce look like? i'm interested in having a somewhat agile development environment with p4, swarm, regular builds, testing, etc. Compared to something like a CRUD javascript app, unreal + p4 make this process a lot clunkier lol