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

Looking for Perforce guidance

Discussion in 'Editor & General Support' started by Saxi, Feb 21, 2015.

  1. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    I am trying to move from Git to Perforce.

    Anyone who has been using Perforce for a while in Unity, I could really use a hand with some questions.

    1) Do you create a new Depot for each Unity project, or one depot for all your Unity projects?
    2) Is there a global submit for a project, right now it seems like I have to go into Version Control setting, and select all Project Settings, and "Submit" them. Then select all my Project files and add & Submit them. Is there a button some where to "Submit all"?
    3) Is there any advantage to P4 Connect over the native Team license integration?
    4) Do you have a type mapping configured or does Perforce handle it fine without one?
    5) What do you use for mapping for each new project so you don't get library and other non-vcs files in your VCS.
    6) Is there a concept of a project in Perforce? Like if I want to check out a project, do I just find the folder and check it out? It seems like Perforce handles versioning just as a bunch of individual files that are versioned individually. How would you "tag" a release as 1.0 for example like you would in Git? It doesn't seem like Unity integration has any way to do tagging.
    7) Is there anyway to get Unity to auto check out? So if I edit something, it checks it out, rather than having to manually check everything out prior to making changes?
    8) For the most part you can get along with one workspace per machine, not per project right except in special cases where you want an additional workspace?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    Answer

    You can right click and submit on the change list itself to submit everything you have currently checked out.

    Haven't used P4Connect so don't know.

    As long as you set your project to use Text-based serialisation before Perforce ever gets a whiff of it, you should be fine without one.

    What do you mean 'use for mapping' ?

    There's no concept of a 'project' in Perforce. Perforce has native support for tagging but it's possible we don't expose this through the UI.

    No, you always have to click the 'checkout' button at the bottom of the Inspector.

    Correct.
     
  3. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Thanks Superpig!

    As for "use for mapping", I am asking what you use for your workspace mapping so you avoid pulling in Library and other files you don't want in VCS. It looks like Perforce/Unity integration might do this automatically, as I can see the root folders (Library and so on) in my Workspace, but when I look at Depot I don't see them there.

    Since Perforce has no concept of Projects and from that link you posted it seems like using one depot is the common use, how do you know you are checking out all parts of a project, is it strictly file based (as in, check out this folder and you get the entire project)?

    As for tags, I do not see a way to do tags in Unity, so I assume it is not exposed as well. Is it possible to put this in a suggestion? I assume Unity cloud build gets triggered when there is a new Label (tag) applied, so it would be nice to have in the Editor.
     
  4. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    I ended up trying the P4 Connect asset and it makes the integration a lot better by reducing the amount of mindless clicking you have to do. If you go to edit a file, it will auto check out. When you goto submit, it has a better interface to do this. As well as a few other things that make it a much better and easier experience.