playMaker

Author Topic: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]  (Read 9240 times)

wongalan2002

  • Playmaker Newbie
  • *
  • Posts: 1
PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« on: December 18, 2013, 09:33:59 PM »
I am using the wonderful PlayMakerVuforia.unitypackage
https://hutonggames.fogbugz.com/default.asp?W1119


But after upgrade to vuforia 2.8, some error come up on PlayMakerVuforiaProxy.cs, any idea how to fix this issue?

error CS0117: `Tracker' does not contain a definition for `Type'
error CS1501: No overload for method `GetTracker' takes `1' arguments

-----------------------------------[SOLVED]-------------------------------------------

Just follow the migration guide:
https://developer.vuforia.com/resources/dev-guide/migrating-your-unity-project


replace
Code: [Select]
TrackerManager.Instance.GetTracker(Tracker.Type.IMAGE_TRACKER)
with
Code: [Select]
TrackerManager.Instance.GetTracker<ImageTracker>()
and replace

Code: [Select]
TrackerManager.Instance.InitTracker(Tracker.Type.IMAGE_TRACKER)
with

Code: [Select]
TrackerManager.Instance.InitTracker<ImageTracker>()
the complete PlayMakerVuforiaProxy.cs should be:


Code: [Select]
using UnityEngine;
using System.Collections;

public class PlayMakerVuforiaProxy : MonoBehaviour {

public bool debug = true;


public static bool ActivateDataSet(string dataSet,bool state)
{
if (!QCARRuntimeUtilities.IsQCAREnabled())
        {
            return false;
        }

        if (QCARRuntimeUtilities.IsPlayMode())
        {
            // initialize QCAR
            QCARUnity.CheckInitializationError();
        }

        if (TrackerManager.Instance.GetTracker<ImageTracker>() == null)

        {
            return false;
        }

ImageTracker imageTracker = (ImageTracker)TrackerManager.Instance.GetTracker<ImageTracker>();

foreach(DataSet _set in imageTracker.GetDataSets())
{
Debug.Log (_set.Path);

/*
if (state)
{
return imageTracker.ActivateDataSet(dataSet);
}else{
return imageTracker.DeactivateDataSet(dataSet);
}
*/
}
return false;
}

public static bool RefreshDatasets(DataSetLoadBehaviour dataSetBehaviour)
    {


        if (!QCARRuntimeUtilities.IsQCAREnabled())
        {
            return false;
        }

        if (QCARRuntimeUtilities.IsPlayMode())
        {
            // initialize QCAR
            QCARUnity.CheckInitializationError();
        }

        if (TrackerManager.Instance.GetTracker<ImageTracker>() == null)
        {
TrackerManager.Instance.InitTracker<ImageTracker>();
        }else{
ImageTracker imageTracker = (ImageTracker)TrackerManager.Instance.GetTracker<ImageTracker>();
imageTracker.DestroyAllDataSets(true);
}

        if (dataSetBehaviour.mDataSetsToLoad.Count <= 0)
        {
            Debug.LogWarning("No data sets defined. Not loading any data sets.");
            return false;
        }

        foreach (string dataSetName in dataSetBehaviour.mDataSetsToLoad)
        {
            if (!DataSet.Exists(dataSetName))
            {
               Debug.LogWarning("Data set " + dataSetName + " does not exist.");
               return false;
            }

            ImageTracker imageTracker = (ImageTracker)TrackerManager.Instance.GetTracker<ImageTracker>();
            DataSet dataSet = imageTracker.CreateDataSet();

            if (!dataSet.Load(dataSetName))
            {
                Debug.LogWarning("Failed to load data set " + dataSetName + ".");
                return false;
            }

            // Activate the data set if it is the one specified in the editor.
            if (dataSetBehaviour.mDataSetsToActivate.Contains(dataSetName))
            {
                imageTracker.ActivateDataSet(dataSet);
            }
        }

return true;
    }

}
« Last Edit: December 18, 2013, 09:54:37 PM by wongalan2002 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #1 on: December 19, 2013, 02:19:14 AM »
Hi,

 Thanks for spotting this and looking it up!

I'll push these changes when I am done with Mecanim and pathfinding ok? I need to get these out of the door first, it's been too long already.

bye,

 Jean

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #2 on: January 10, 2014, 03:31:05 PM »
Thanks for the fix, this has resolved the issue main issue. However, I'm getting a problem with UDTUIEventHandler.cs after applying the code edits.

Assets/Scripts/UDTUIEventHandler.cs(63,32): error CS1061: Type `UIButton' does not contain a definition for `TappedOn' and no extension method `TappedOn' of type `UIButton' could be found (are you missing a using directive or an assembly reference?)

I'm searching for a fix but any help would be appreciated.
« Last Edit: January 10, 2014, 03:32:38 PM by retox »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #3 on: January 14, 2014, 07:05:11 AM »
hi,

 Can you bump this next week? I'll have a look.

bye,

 Jean

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #4 on: January 27, 2014, 07:48:28 AM »
*Bump  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #5 on: January 31, 2014, 07:02:03 AM »
Hi,

 ok, I am dealing with this now, but I get the same error in one of their own file...
"ImageTargetsMenu.cs".

Did you had to modify this as well? that's sounds very odd to me.

bye,

 Jean

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #6 on: March 07, 2014, 01:19:13 PM »
Hey Jean,

Did you manage to get anywhere with this? Still having the same issue as described above and can't fix it. There's a bug with a previous version of Vuforia on Android builds which means that the most recent version of Vuforia must be used, however the above issue makes it impossible to progress.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #7 on: March 11, 2014, 07:30:47 AM »
Hi,

 Can you give me few more days? bump me beginning on next week. Thanks for your patience. I tested the latest package and the error is gone so I am going to be able to readjust the custom actions I did a while ago.

bye,

 Jean

retox

  • Playmaker Newbie
  • *
  • Posts: 26
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #8 on: March 17, 2014, 05:29:58 PM »
*Bump

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #9 on: March 18, 2014, 08:51:25 AM »
Hi,

 yeah sorry, this week is going to be difficult too unfortunatly, had to rush back to france for family. Please bump me early next week ok? thanks for your patience.

bye,

 Jean

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #10 on: April 01, 2014, 01:54:08 AM »
*bump*

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #11 on: April 04, 2014, 07:18:08 AM »
Hi,

 It's done, finally :)

 Please redownload from the wiki.

bye,

Jean

Playnoob

  • Playmaker Newbie
  • *
  • Posts: 21
Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
« Reply #12 on: April 04, 2014, 03:06:09 PM »
Thank you!