Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Source Control API

Discussion in 'Editor & General Support' started by do-games, Mar 3, 2021.

  1. do-games

    do-games

    Joined:
    May 31, 2018
    Posts:
    17
    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
     
  2. do-games

    do-games

    Joined:
    May 31, 2018
    Posts:
    17