Search Unity

Error executing method of other Script in DefaultTrackableHandler/On Tracking Found

Discussion in 'AR' started by Laralessandra, Jul 15, 2019.

  1. Laralessandra

    Laralessandra

    Joined:
    May 14, 2019
    Posts:
    4
    Hellou Community,

    im experimenting with image targets and there i have some problems with the DefaultTrackableEventHandler and TMPro;

    I am showing a Panel when an image Target is found. and there should be certain infos in that panel when finding the right image target.

    Therefore I saved some data in a script and in another class script im implementing functions that saves the name of the actual target and saves the info of the target in the text field of the panel.

    That works so far.

    But now I've the problem that I have to access and call that function - called OnInfoImageTracked - in de DefaultTrackableEventHandler to make it visible when the target is found an the OnTargetFound() function is called.

    But as i used the prewritten scripts of vuforia to implement my functions the DefaultTrackableEventHandler is in the Vuforia folder and the SampleMainMenu is in the Assets/Skript folder.

    So the DefaultTrackableEventHandler is not able to access the SampleMainMenu class because it's not found. I suppose it's because of the different folders.

    But if I want to move SampleMainMenu Script to the Vuforia Script folder, then Unity doesn't find the TMPro package any more and I can't use it.

    So I already tried to make a new assembly/reference to the moved SampleMainMenu but i'm struggeling.

    Can someone help me figuring out how to solve this.
     

    Attached Files: