Ejemplo n.º 1
0
    private void OnDestroy()
    {
        //Vuforia events, like all events, need to be unregistered if the objects are not destroyed at the same time to avoid the other object from keeping the other object alive forever. This is what happens without unregistering on object destroy or some other disposal method.
        VuforiaARController vuforia = VuforiaARController.Instance;

        vuforia.UnregisterVuforiaStartedCallback(OnInitialized);
        vuforia.UnregisterTrackablesUpdatedCallback(OnTrackablesUpdated);
    }
 private void OnDestroy()
 {
     _vuforia.UnregisterVuforiaStartedCallback(OnInitialized);
     _vuforia.UnregisterTrackablesUpdatedCallback(OnTrackablesUpdated);
     _vuforia = null;
 }