Hello,
Here is the sample code we used :
private IEnumerator RestartResolution() { /* Destroy the existing ImageTracker and WikitudeCamera before creating them again. */ Destroy(CurrentImageTracker.gameObject); Destroy(Camera.gameObject); /* Wait a frame before recreating everything again. */ yield return null; Camera = GameObject.Instantiate(WikitudeCameraPrefab).GetComponent<WikitudeCamera>(); Camera.DesiredCameraResolution = CaptureDeviceResolution.FullHD; CurrentImageTracker = GameObject.Instantiate(ImageTrackerPrefab).GetComponent<ImageTracker>(); GameObject.Instantiate(WikitudeEyePrefab).transform.SetParent(CurrentImageTracker.transform.GetChild(0)); }
private IEnumerator RestartResolution() { /* Destroy the existing ImageTracker and WikitudeCamera before creating them again. */ Destroy(CurrentImageTracker.gameObject); Destroy(Camera.gameObject); /* Wait a frame before recreating everything again. */ yield return null; Camera = GameObject.Instantiate(WikitudeCameraPrefab).GetComponent<WikitudeCamera>(); Camera.DesiredCameraResolution = CaptureDeviceResolution.FullHD; CurrentImageTracker = GameObject.Instantiate(ImageTrackerPrefab).GetComponent<ImageTracker>(); GameObject.Instantiate(WikitudeEyePrefab).transform.SetParent(CurrentImageTracker.transform.GetChild(0)); }
As you can see we are not switching between Camera1 and Camera2. The errors happen whether the application was built with the Camera2 enabled or not on the WikitudeCamera.
The only thing that we changed in the Wikitude Demo App SDK 9.6 was to turn OFF Multithreaded Rendering in the Player Settings.
The issue is happening on all devices (from Android 8 to Android 11).
Regards
Hi,
I tried reproducing this issue, but it didn't occur in my testing. I modified the Camera Settings sample to reset on demand and switch the camera resolution between switches and I didn't have any issues. Are you also switching between Camera1 and Camera2? Maybe that could be an issue on some devices, although it worked fine for me.
Is this issue happening on all devices, or just some?
Thank you,
Alexandru
Hello,
Any update on the subject ?
Best regards
Hi again,
I have one follow-up question:
Thank you,
Alexandru
Hi,
Thank you for reporting this issue. We'll investigate further and let you know as soon as we have any additional information.
May I ask what is the use-case you're trying to achieve? Perhaps we can find a workaround until the final fix is in place.
Best regards,
Alexandru
TeamThales RaRv
- Unity 2020.3.2f1
- Wikitude SKD for Unity v9.6; v9.7.1
- Bug does happen on sample Wikitude app
Step to reproduce :
- Sample Wikitude app for Unity using the Wikitude SDK 9.6 (or 9.7.1)
- Turn off "Multithreaded Rendering" in Player Settings - Other Settings
- In Scene "Camera Controls - Camera Settings", call CameraSettingsController.Restart() (or any custom function that will destroy then recreate the Wikitude Camera and trackers)
Expected :
- Wikitude Camera and trackers are recreated (with changed value on the Camera if any change has been made, i.e on "DesiredCameraResolution" or "EnableCamera2" like in the Restart function)
Result :
- App freezes and Unity console is flooded with following error :