Closed kjyv closed 3 years ago
Hello @kjyv which versions of AR Simulation, Unity Editor and ARFoundation are you using?
@kjyv for this and future reports, please make sure to fill in required bug report details as per the issue template (New Issue > Bug Report).
This allows us to help you much more efficient without days or weeks of back-and-forth. Thank you!
Sorry, didn't use it out of habit. Original description is updated.
Possibly related to https://github.com/needle-tools/ar-simulation/issues/49
I'm also getting a lot of
InvalidOperationException: Trackable 8984730000000000-AC41330000000000 is being removed but is not in the list of trackables.: UnityEngine.XR.ARSubsystems.ValidationUtility`1[T].AddToSetAndThrowIfDuplicate (UnityEngine.XR.ARSubsystems.TrackableId trackableId, System.Boolean shouldBeInDictionary, System.String action) (at Library/PackageCache/com.unity.xr.arsubsystems@4.1.5/Runtime/TrackingSubsystem/ValidationUtility.cs:71)
UnityEngine.XR.ARSubsystems.ValidationUtility`1[T].ValidateAndThrow (UnityEngine.XR.ARSubsystems.TrackableChanges`1[T] changes) (at Library/PackageCache/com.unity.xr.arsubsystems@4.1.5/Runtime/TrackingSubsystem/ValidationUtility.cs:36)
UnityEngine.XR.ARSubsystems.ValidationUtility`1[T].ValidateAndDisposeIfThrown (UnityEngine.XR.ARSubsystems.TrackableChanges`1[T] changes) (at Library/PackageCache/com.unity.xr.arsubsystems@4.1.5/Runtime/TrackingSubsystem/ValidationUtility.cs:55)
UnityEngine.XR.ARSubsystems.XRPlaneSubsystem.GetChanges (Unity.Collections.Allocator allocator) (at Library/PackageCache/com.unity.xr.arsubsystems@4.1.5/Runtime/PlaneTracking/XRPlaneSubsystem.cs:81)
This seems to work partly now with a combination of properly setting up Simulated AR Plane Generation (#50), and not calling XRGeneralSettings.Instance.Manager.StopSubsystems() and later again XRGeneralSettings.Instance.Manager.StartSubsystems() - we were just calling subsystem?.Start() on each component that we use anyway. Additional plane parts are now detected when moving around, before it was only finding one on the first start of AR, so plane detection itself is active and working. The planes that were already detected are not detected but I guess they should after calling Stop() on the plane subsystem.
Hello @kjyv could you try again with 1.2.0-preview.4
?
Attached is a simple scene with XR settings that starts/stops subsystems
Hello, thanks for the update. Your sample does not throw any error which is good. I had just added usage of StopSubsystems() etc. to our project to test if it makes a difference, we didn't use it before. Our code is enabling/disabling components like ARPlaneManager separately as needed but also when "disabling AR" altogether. This worked before and now but the ARPlanes are still not removed when doing so. Is that supposed to happen when using StopSubsystems?
This seems to be solved after removing a spurious AR Plane object that was (I think) created by the "Convert to Extended AR Scene", the Simulated Plane Generation is enough. After that, the remaining plane trackables are deleted when starting the plane subsystem again (maybe should actually happen when disabling it but ok for us)
Describe the bug We enable AR by enabling the various AR Foundation components and disable it during runtime of our App by disabling them again. Doing the same with AR Simulation will only work the first time, after that e.g. no planes are detected.
Versions (please complete the following information):