I don't have any special scripts, I'm just using an ImageTracker example scene with my own models. The script on the ImageTracker is DefaultTrackableEventHandler.cs. The vast majority of the time everything works fine, it's only 20% or less that it seems to get stuck.
I'm fairly new to this code, but I've traced the issue here:
TrackableBehaviour.cs
public void OnTrackerUpdate(Status newStatus)
{
// Update status:
Status prevStatus = mStatus;
mStatus = newStatus;
if (prevStatus != newStatus)
{
Debug.Log ("STATUS CHANGED: " + newStatus); // Always gets here, newStatus is TRACKED
foreach (ITrackableEventHandler handler in mTrackableEventHandlers)
{
handler.OnTrackableStateChanged(prevStatus, newStatus);
}
However, when it gets stuck, it prints the above Debug statement, and never reaches the Debug.Log call ("2OnTrackableStateChanged") in DefaultTrackableEventHandler.cs
/// <summary>
/// Implementation of the ITrackableEventHandler function called when the
/// tracking state changes.
/// </summary>
public void OnTrackableStateChanged(
TrackableBehaviour.Status previousStatus,
TrackableBehaviour.Status newStatus)
{
Debug.Log ("2OnTrackableStateChanged: " + newStatus);
if (newStatus == TrackableBehaviour.Status.DETECTED ||
newStatus == TrackableBehaviour.Status.TRACKED)
{
OnTrackingFound();
}
else
{
OnTrackingLost();
}
}
For some reason mTrackableEventHandlers is empty, so there are no handlers to iterate over in OnTrackerUpdate in TrackableBehaviour.cs
idealreal,
The "OnTrackableStateChanged" callback name has not changed. If you have upgraded an existing project from an older version of Vuforia, you may wan to check the migration guide:
https://developer.vuforia.com/resources/dev-guide/transitionmigration-guide
If you have simply upgraded an existing project from an older version of Unity to the latest Unity 4.6, one thing you could try is to close your Unity project, clean (remove) the "Library" and "Temp" folders under your project directory and reopen the Unity project and let Unity re-generate those folders automatically.
Sometimes, this simple trick solves many issues.
One last thing to check is if the Vuforia Samples work for you, by creating a fresh new project and import one of the sample packages.