Perforce Support
Collecting ideas on how to better integrate with Perforce as VCS.
Perforce's integration with Unity.
Thing that come to mind:
- Support on Sentry https://github.com/getsentry/sentry/issues/68525
- Automatic support of equivalent to
.gitignore. i.e. during the wizard. This is to prevent accidental inclusion of the cli options
Will note that currently, if you have Perforce enabled in Unity, and you open the SDK's settings, it will automatically check out Plugins/Sentry/SentryCliOptions.asset and Resources/Sentry/SentryOptions.asset even if you don't change anything. I imagine this is because it's being written to even if it has no changes to it, which Unity intercepts and requires a checkout for.
This isn't exactly a huge issue (Perforce has the ability to revert unchanged files), but it is a bit annoying to have to do it somewhat frequently.
Also, my next best alternative to having commit numbers is to do the following:
var proc = new System.Diagnostics.Process();
// $ p4 -z tag changes -m1 ($pwd)...#have
// outputs the highest change number in the current directory along with some other info in the format [... key value]
proc.StartInfo.FileName = "p4";
proc.StartInfo.Arguments = $"-z tag changes -m1 {Directory.GetCurrentDirectory()}...#have";
... // other process params
proc.Start();
var output = proc.StandardOutput.ReadToEnd();
var changelist = "";
if (output.StartsWith("... change ")) {
// since the first line is "... change XXXXXX", we can just cut out the start characters and go to the newline
changelist = output["... change ".Length..output.IndexOf('\n')];
}
I then set this changelist to something internally that gets maintained in builds, but it would be nice if there was some kind of interaction between the build steps of the Unity Sdk and releases that I could manage
Thanks! I hugely appreciate the input!