0

I want to use the tracking function. but when I coding with 'ITrackableEventHandler', an error occurs(Error CS0246 : The type or namespace name 'type/namespace' could not be found). The version I am using is Unity 2020.3 and Vuforia 10.5.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;

public class csTracking : MonoBehaviour, ITrackableEventHandler
{
    private TrackableBehaviour mTrackableBehaviour;
    // Start is called before the first frame update
    void Start()
    {
        mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if(mTrackableBehaviour)
        {
            mTrackableBehaviour.RegisterTrackableEventHandler(this);
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

I searched, but I couldn't find a replacement code.

Keastmin
  • 85
  • 6
  • What are the errors you get? Could this be related to [Errors when upgrading Vuforia in Unity from version 9 to version 10](https://stackoverflow.com/questions/71493346/errors-when-upgrading-vuforia-in-unity-from-version-9-to-version-10) ? – derHugo Apr 01 '22 at 05:55
  • I'm sorry. I've edited it. – Keastmin Apr 01 '22 at 06:31
  • Thank you, but not related to the question. – Keastmin Apr 01 '22 at 06:34
  • please include your exact complete error message ... **which** type or namespace is not found? – derHugo Apr 01 '22 at 06:38
  • And if I look at [this page](https://library.vuforia.com/articles/Solution/Working-with-Vuforia-and-Unity.html) it sounds like it is pretty much related: `This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.` I don't fin any `ITrackableEventHandler` in the API for Vuforia 10 only for 9.8 and earlier ... – derHugo Apr 01 '22 at 06:42
  • In the end, it was a version problem. However, the vuforia 9.8 version is not imported on my computer. The previous version of Unity is not installed. I guess it's more of a compatibility issue between Computer and Vuforia than between Unity and Vuforia. – Keastmin Apr 01 '22 at 06:57
  • Your computer itself doesn't compile Vuforia .. Unity does. It doesn't matter if you came from a previous version or not ... but the code you are using simply was for an older version and is not anymore up-to-date – derHugo Apr 01 '22 at 07:07
  • then My first task is to find out what code using at present. Thank you. – Keastmin Apr 01 '22 at 07:16

0 Answers0