Skip to content

VuforiaBehaviour.Instance.enabled = false does not pause Vuforia #220

Description

@StefanLewin

Summarize the bug:
Before, we used VuforiaBehaviour.Instance.enabled = false to pause the Vuforia Engine, so the currently detected target won't get lost. This does not seem to work anymore.

Observed problem
I tested this behaviour, by using the VuforiaApplication.Instance.OnVuforiaPaused and VuforiaApplication.Instance.OnVuforiaStopped events. When executing VuforiaBehaviour.Instance.enabled = false the VuforiaApplication.Instance.OnVuforiaStopped is triggered.

Expected result
I expect the VuforiaApplication.Instance.OnVuforiaPaused event to be triggered, when VuforiaBehaviour.Instance.enabled = false is executed. This behaviour is implied in the documentation

Other observations
This behaviour started after upgrading from Vuforia 10.20.3 to 11.4.4.

Reproducible steps
I tested, using this code snippet:

        private void OnEnable()
        {
            VuforiaApplication.Instance.OnVuforiaPaused += TestOutputPauseLog;
            VuforiaApplication.Instance.OnVuforiaStopped += TestOutputStoppedLog;
        }

        private void OnDisable()
        {
            VuforiaApplication.Instance.OnVuforiaPaused -= TestOutputPauseLog;
            VuforiaApplication.Instance.OnVuforiaStopped -= TestOutputStoppedLog;
        }

        private void TestOutputStoppedLog()
        {
            Debug.Log("vuforia STOP");
        }

        private void TestOutputPauseLog(bool obj)
        {
            Debug.Log("vuforia PAUSED");
        }

Affected Vuforia Engine version:
v11.4.4

Affected platform:

  • Workstation OS: macOS Tahoe 26.5.1
  • Platform: Unity
  • Platform version: 6000.3.18f1

Affected device:
Appears in Unity Editor.

Workaround
Methods, which are supposed to exeute on VuforiaApplication.Instance.OnVuforiaStopped, are now executed, even though Vuforia is supposed to be paused. To prevent their execution, we added the following check, as a temporary workaround:

if (!VuforiaBehaviour.Instance.enabled) 
  return;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions