Log in or register to post comments

Could someone from Support check the Unity Migration to Vuforia 6.2 Guide?

October 6, 2017 - 4:35am #1

There seem to be a lot of people with the same or similar problems trying to Upgrade from Vuforia 5 (in my case 5.5.9) to 6.2, here are a few past threads dealing with the same problems:

https://developer.vuforia.com/forum/unity/migrate-v505-v62

https://developer.vuforia.com/forum/unity-extension-technical-discussion/vuforia-62-configurationupgradecs-error

https://developer.vuforia.com/forum/unity-extension-technical-discussion/upgrade-vuforia-62

 

The Migration guide can be found here: https://library.vuforia.com/articles/Solution/How-To-Migrate-a-Unity-Project.html#migrating-6-2 and it says to Download the "ConfigurationUpgrade.cs" script, but there is no Download link available in the guide:

Quote:

Download the upgrade script ConfigurationUpgrade.cs and add it to any Assets/Editor folder.

It instead links to the page with the Script that can be Copy/Pasted into a Unity Script afterwards: https://library.vuforia.com/articles/Solution/Unity-Configuration-Upgrade-Script-for-Vuforia-6-2-plus

 

As other people have said in past topics regarding this problem, immediately after Copy/Pasting "ConfigurationUpgrade.cs" from that page as Assets/Editor/ConfigurationUpgrade.cs one starts getting these Errors in Unity:

Quote:

Assets/Editor/ConfigurationUpgrade.cs(74,25): error CS1525: Unexpected symbol `bs'

Assets/Editor/ConfigurationUpgrade.cs(352,33): error CS1525: Unexpected symbol `1'

 

This can be fixed by adding a "?" to lines 74 and 352 so they look like this:

Quote:

var name = idx < 0 ? bs.path : bs.path.Substring(idx+1);

WriteProperty(property, value ? 1 : 0);

 

So far so good, but afterwards one gets this Error instead:

Quote:

Assets/Editor/ConfigurationUpgrade.cs(327,60): error CS1061: Type `UnityEditor.SerializedProperty' does not contain a definition for `GetArrayItems' and no extension method `GetArrayItems' of type `UnityEditor.SerializedProperty' could be found. Are you missing an assembly reference?

Could someone from Vuforia try a manual Upgrade for a sample project using the provided guide and see if it works? Could it be that the only script available on the site: https://library.vuforia.com/articles/Solution/Unity-Configuration-Upgrade-Script-for-Vuforia-6-2-plus isn't Up-to-Date and you forgot to offer a link to download "ConfigurationUpgrade.cs" or haven't updated the Live version on that page with the newest version and that's where the problem stems from?

 

tl;dr:

 

Thanks in advance.

Could someone from Support check the Unity Migration to Vuforia 6.2 Guide?

October 17, 2017 - 11:26am #2

For people who still have an issue with this, the GetArrayItems-Method is missing in the linked Vuforia Configuration Upgrade Script: https://library.vuforia.com/articles/Solution/Unity-Configuration-Upgrade-Script-for-Vuforia-6-2-plus and I had to replace some code after line 325, change this:

case PropertyType.STRING_ARRAY:

   string[] data;

   serializedObject.FindProperty(property.BehaviourName).GetArrayItems(out data);

   WriteProperty(property.ConfigurationName, data);

   break;

Into this:

case PropertyType.STRING_ARRAY:

   string[] data = new string[serializedObject.FindProperty(property.BehaviourName).arraySize];

   for (int i=0; i < serializedObject.FindProperty(property.BehaviourName).arraySize; i++){

      data [i] = serializedObject.FindProperty (property.BehaviourName).GetArrayElementAtIndex (i).ToString();

   }

   WriteProperty(property.ConfigurationName, data);

   break;

 

 

And it should go through fine after.

Log in or register to post comments