Log in or register to post comments

vuforia 9.1.7 'ITrackableEventHandler' could not be found

May 14, 2020 - 11:52pm #5

I have downloaded vuforia 9.17 and using it in unity. Have written a C# script, part of which is :

using Vuforia;

public class ABCD : MonoBehaviour, ITrackableEventHandler

And it throws an error on compiling : "ITrackableEventHandler' could not be found. Need help !!

 

vuforia 9.1.7 'ITrackableEventHandler' could not be found

May 15, 2020 - 3:13am #4

Hi,

Please try DefaultTrackableEventHandler.

Thank you.

Vuforia Engine Support

vuforia 9.1.7 'ITrackableEventHandler' could not be found

June 17, 2020 - 10:47pm #3

Hello

Same error here.



I should call 2 methods into MyItemClass. 



onTargetFound I should call MyItemClass.playMe()

onTargetLost I should call MyItemClass.resetMe();



I tried to set it up as you can see in the screenshot (attached) but doesn't work.



Could you help me?

 

 

vuforia 9.1.7 'ITrackableEventHandler' could not be found

June 18, 2020 - 9:04am #2

Hi,

I've replaced Monobehavior,ITrackableEventHandler with DefaultTrackableEventHandler and it's still not working also it gives me an error in the 

mTrackableBehaviour.RegisterTrackableEventHandler(this) line.

Here's a part of the code, I'm trying to play an audio file when a target is detected.

public class OnDetectPlayAudio : DefaultTrackableEventHandler

{

      private TrackableBehaviour mTrackableBehaviour;

    // Start is called before the first frame update

    void Start()

    {

        mTrackableBehaviour = GetComponent<TrackableBehaviour>();

    if (mTrackableBehaviour) {

      mTrackableBehaviour.RegisterTrackableEventHandler(this);

    }

    }

    public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus,

    TrackableBehaviour.Status newStatus)

     {

    if (newStatus == TrackableBehaviour.Status.DETECTED ||

        newStatus == TrackableBehaviour.Status.TRACKED ||

        newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)

    {

        //play audio

        Debug.Log("play");

        mTrackableBehaviour.gameObject.GetComponentInChildren<AudioSource>().Play();

   

    }

    else{

        //stop audio

               

        Debug.Log("stop");   

        mTrackableBehaviour.gameObject.GetComponentInChildren<AudioSource>().Stop();



    }

  }

}

vuforia 9.1.7 'ITrackableEventHandler' could not be found

May 5, 2021 - 10:04pm #1

DefaultTrackableEventHandler also uses ITrackableEventHandler which is not found, So problem is same, how to resolve this issue?

Thanks

Log in or register to post comments