Source Control API

Hi,

Are there any APIs in Unity C# that return details of, or allow interaction with projects that are managed by the source control plugin? For our purposes, Perforce, but also more generally? We have build scripts that perform asset manipulation in an automated way, and currently, when a project is managed by Perforce, build-time code that does things like copying or updating files can fail due to those files being read-only, unless they are checked out in a P4 changelist. If there was a way to check the project and file states using the source control plugin, we could make our build scripts more robust and user friendly, even automating things like checkout/commit where appropriate. I know this can also be done externally to Unity, but wondered if there is a way to do it from our C# scripts.

I’ve had a brief look at the source control plugin in github, but I’m not familar with whatever interface Unity uses to talk to it. Is that documented anywhere?

Regards,

Steve

Not sure why I didn’t spot this before, but there is of course the UnityEditor.VersionControl API. :slight_smile: