Hi guys,
I’m trying to write a tool that our artists can use to verify their checkins. We’ve had a lot of problems with people adding prefabs but forgetting various dependencies.
We are using Perforce (2014 February 25 visual client) with Unity 4.3.4f1, Pro version with Team license, Windows 7 x64. Perforce Plugin turned on and set up in Project Settings > Editor.
I’m trying to use the UnityEditor.VersionControl.Provider functions found here:
Almost every one of these returns a Task:
Which has a “success” variable.
I am first checking whether the provider is ready and enabled using:
bool providerEnabled = Provider.enabled && Provider.isActive;
Which returns True. However, ALL my actions I attempt return a Task with a failed success state. I have not been able to get information about my ChangeSets, for example.
I have been able to checkout files from code, like this:
if (providerEnabled) Provider.Checkout(targetPrefab, CheckoutMode.Both);
Which works… but the Task returned for that operation says it failed! The files do successfuly get checked out in my Default changelist. I am unable to add/move files around to specific changelists though because Provider.ChangeSets and Provider.ChangeSetStatus() never return anything but a failed Task.
Does anyone know what’s going on? Could it be that Unity and the P4V client became incompatible at some point?