I'm working on a developing an application that allows the user to go in and out of augmented reality situations, which involves a lot of turning on and off Vuforia at various times. We recently updated the app to Unity 2018.3.11f and Vuforia 8.1.7, and while there were some problems we could work around, one that I've yet to find a solution for is a crash that occurs when attempting to use a Mid-Air augmentation after running several Ground Plane augmentations, turning the VuforiaBehaviour off in between each augmentation.
To quickly lay out steps of creating the crash in our app, noting that all of this occurs in a single scene:
- Open and play a ground plane augmentation. Vuforia is initialized and turned on here. If(!initialized) VuforiaRuntime.Instance.InitVuforia(); VuforiaBehaviour.Instance.enabled = true;
- Disable the VuforiaBehaviour. (VuforiaBehaviour.Instance.enabled = false;)
- Open and play the ground plane augmentation again. Vuforia is turned back on.
- Repeat steps 2 - 3 several times(10+)
- Open and play a Mid-Air augmentation. App freezes, and remains frozen until the app is closed.
One resolution to this problem is to simply not turn Vuforia off, but because this drains nearly 4 times the battery, this isn't really an option for our app.
I can provide some specific code samples if necessary!
Hello,
Hello,
Although intuitive, disabling the VuforiaBehaviour can lead to unexpected behavior of the SDK. I'll open a ticket to see if this use case can be made more robust in the future.