Under Review
Andy Buchanan 2 weeks ago • updated 4 days ago 6

Not a show stopper since you can just check it out and re-run, but might be cool if it used the Version Control API to automate the step.

Hm, can you be more specific as to what fails? I don't use Perforce so I can't test myself.

If you want to run that step from script, you can use (undocumented / might change later):


UnauthorizedAccessException: Access to the path "D:/Wish/Perforce/KIP/Main/Scratch/ArtTest/FirstPass_AnimationTests/SwirlyThing.2017/Assets\Generated/Ludiq.Core\Property Providers\Editor.meta" is denied.
System.IO.File.Delete (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:179)
Ludiq.SerializedPropertyProviderProvider.GenerateProviderScripts () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/SerializedProperties/SerializedPropertyProviderProvider.cs:40)
Ludiq.GeneratePropertyProvidersPage.OnContentGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/GeneratePropertyProvidersWindow/GeneratePropertyProvidersPage.cs:38)
Ludiq.GeneratePropertyProvidersPage:OnContentGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/GeneratePropertyProvidersWindow/GeneratePropertyProvidersPage.cs:45)
Ludiq.Page:DrawContent() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Page.cs:56)
Ludiq.Wizard:OnGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Wizard.cs:103)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:41)

If you feel like testing perforce integration I think you can still get a free 2 seat licence.

I'm a bit confused as to what's happening here. The folder exists, but Perforce seems to have a mutex lock on it. 

When you're "not checked out", in which "state" are you? Haven't used Perforce but if it's any similar to Git, the folder shouldn't even exist if you're not checked out, right?

Perforce works on a locking model, all files that Perforce is managing will be marked as read-only, a file only becomes writable if it is checked out. You can make sure files are checked out in Unity using the Version Control API.  e.g. (From one of my plugins) 

UnityEditor.VersionControl.Provider.Checkout( eventsFile, UnityEditor.VersionControl.CheckoutMode.
Both ).Wait();

Unity tends to handle this for you automatically when you're using Assets, but other file ops have to be done manually like this