Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wongalan2002 on December 18, 2013, 09:33:59 PM

Title: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: wongalan2002 on December 18, 2013, 09:33:59 PM
I am using the wonderful PlayMakerVuforia.unitypackage
https://hutonggames.fogbugz.com/default.asp?W1119 (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 (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;
    }

}
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre 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
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: retox 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.
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre on January 14, 2014, 07:05:11 AM
hi,

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

bye,

 Jean
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: retox on January 27, 2014, 07:48:28 AM
*Bump  :)
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre 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
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: retox 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.
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre 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
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: retox on March 17, 2014, 05:29:58 PM
*Bump
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre 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
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: Playnoob on April 01, 2014, 01:54:08 AM
*bump*
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: jeanfabre on April 04, 2014, 07:18:08 AM
Hi,

 It's done, finally :)

 Please redownload from the wiki.

bye,

Jean
Title: Re: PlayMakerVuforia error after upgrade to vuforia 2.8 [SOLVED]
Post by: Playnoob on April 04, 2014, 03:06:09 PM
Thank you!