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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Native Perforce integration not detecting changes to files

Discussion in 'Editor & General Support' started by hippocoder, Feb 5, 2016.

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Been using Perforce a while. I think abusing is the best word for it. I'd love to know how to get perforce to pick up script changes automatically. I use the built in support. When I make changes, perforce really doesn't understand I've made changes to the code, so I have to hunt through and check them out manually.

    Am I missing something?

    Thanks for any replies!
     
  2. evanratt

    evanratt

    Joined:
    Mar 11, 2015
    Posts:
    102
    Aren't your files read-only until you check them out? How are you making changes to scripts without checking them out?
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    None of the scripts appear to be read only - VS opens and saves them fine.
     
  4. evanratt

    evanratt

    Joined:
    Mar 11, 2015
    Posts:
    102
    Does your Perforce workspace have "allwrite" enabled? In our setup, at least, unless something is checked-out, it's read-only. That way, you have to check the file out to edit it.

    If you're looking for a git-style workflow, where you can just edit files in your local repository and have Perforce detect what's changed, I honestly don't know if Perforce has that capability--someone with more advanced Perforce-fu will need to chip in.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Aha yes, I believe allwrite was checked for some reason or other - I think I must've been failing to edit the scripts and toggled. Thanks for the tip - I am a complete noob at perforce :)
     
  6. OutOfMyMindDave

    OutOfMyMindDave

    Joined:
    Jun 2, 2015
    Posts:
    5
    You can right-click on a file or directory in Perforce and select Reconcile Offline Work... to find any edited files that haven't been checked out. Even with everything seemingly working correctly, I still run that command every few days just to be sure.