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.

Question Access current changeset from within a build script

Discussion in 'Plastic SCM' started by Thunderik, Dec 22, 2021.

  1. Thunderik

    Thunderik

    Joined:
    Apr 28, 2020
    Posts:
    24
    Hi! Before updating to this package I was able to check which VersionControlSettings.mode was being used, see that it is Plastic and then running a process which runs "cm" and then retrieve the changeset. I can still do that but with the caveat that VersionControlSettings.mode doesn't tell me I'm using PlasticSCM any more :(

    There's an Unity.Plastic.Editor API but I couldn't find much use there for this use case, any thoughts?
     
  2. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @erkneren, you're right that the VersionControlSettings.mode does not return back if Plastic SCM is being used since that setting was used for the legacy Unity integration of Plastic SCM, which is no longer supported.

    The Plastic SCM package team recognizes the value of offering a public API so that our users can utilize custom tools for their own needs. We're still in the process of gathering data from users, reaching out to them, so that we can understand the most common use cases before we work on a public API. I feel like I can relay your specific need in this post to the team, but if you have more cases that you'd like to see supported and would like to schedule a meeting with our Project Manager to discuss them further, please reach out to me and I can try to make that happen.

    For now, a less-eloquent workaround for checking if your project has a Plastic SCM workspace is checking if your Project's root folder contains a .plastic4 folder.
     
  3. Thunderik

    Thunderik

    Joined:
    Apr 28, 2020
    Posts:
    24
    Hi @ryanc-unity, thanks for the response and workaround! It would be beneficial if the public API offered a way to retrieve the latest changeset while keeping some kind of parity with the "old" API. Thanks for offering the meeting, I will keep it in mind as I speak with a colleague in the near future.

    Kind regards,
    Erik
     
    Ryan-Unity likes this.