Unity & P4Connect

746 views Asked by At

I just set up a Perforce server for my company where I'm going to store some depots for our Unity projects. I'm using the P4Connect plugin to integrate p4 functionalities in Unity.

However I'm experiencing some problems in the submission phase of my files, the exact error shown on a popup is:

"Cannot submit files... Submit failed4, open P4V and make sure your files are in the default change list"

The files are actually already in the default change list, unfortunately P4Connect log files don't show anything regarding this error.

These are the steps I made from the creation of the depot to the submission attempt.

  1. I create a local depot on the server using P4Admin
  2. I make sure I have enough privileges to access/edit the depot
  3. Using P4V I create a new workspace with its root matching the one of the depot
  4. Through window explorer I copy my project inside the root of the workspace
  5. I open with Unity the project in the workspace
  6. In project settings I enable visible metafiles
  7. I install P4Connect from the unity asset store
  8. I configure it and make sure it can connect to the server and that the workspace name matches the one I created using P4V
  9. Until now everything works, the plugin recognizes the new files
  10. Since every file is new I select every file and click on "add to depot"
  11. In the Perforce tab I enter a description and click on submit
  12. The error previously described shows up

The problem arises even if I try to add a single file instead of the whole project.

here is the callstack of an exception that is thrown:

NullReferenceException: Object reference not set to an instance of an object
Perforce.P4.FileMetaData.op_Implicit (Perforce.P4.FileMetaData s) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Bridge/p4api.net/FileMetaData.cs:866)
Perforce.P4.Changelist.ToString () (at c:/tmp/53044412/depot/main/p4-connect/src/P4Bridge/p4api.net/Changelist.cs:584)
Perforce.P4.Repository.SaveChangelist (Perforce.P4.Changelist change, Perforce.P4.Options options) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Bridge/p4api.net/Repository.Changelist.cs:54)
Perforce.P4.Repository.CreateChangelist (Perforce.P4.Changelist change, Perforce.P4.Options options) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Bridge/p4api.net/Repository.Changelist.cs:331)
Perforce.P4.Repository.CreateChangelist (Perforce.P4.Changelist change) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Bridge/p4api.net/Repository.Changelist.cs:435)
P4Connect.Engine.SubmitFiles (P4Connect.PerforceConnection aConnection, System.String aChangeListDescription, System.Collections.Generic.List`1 aFiles) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.Engine.cs:818)
UnityEngine.Debug:LogException(Exception)
P4Connect.Engine:SubmitFiles(PerforceConnection, String, List`1) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.Engine.cs:825)
P4Connect.<>c__DisplayClassa:<SubmitFiles>b__8(PerforceConnection) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.PendingChanges.cs:917)
P4Connect.Engine:PerformConnectionOperation(Action`1) (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.Engine.cs:753)
P4Connect.PendingChanges:SubmitFiles() (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.PendingChanges.cs:917)
P4Connect.PendingChanges:OnGUI() (at c:/tmp/53044412/depot/main/p4-connect/src/P4Connect/P4Connect/P4Connect.PendingChanges.cs:744)
UnityEditor.DockArea:OnGUI()

If I use P4V to submit those files everything works fine, however I prefer to avoid using P4V since it's not integrated with Unity and makes the whole thing more complex to manage.

Am I doing something wrong or does anyone had similar problems and knows how to fix this? I'm using Unity 5.1.1f1 and P4Connect 2.7 (actually the latest versions for both).

Thanks

0

There are 0 answers