Closed FreakTheMighty closed 2 years ago
Can you tell me what Anchor Manager Subsystem you are using? (ARFoundation, XRSDK, WSA) And what your version of Unity is?
Thanks!
By the way, do you have the "Null Subsystem in Editor" boxed checked in the Anchor Management Settings? You should, because that error is telling you that it is failing to start the XR system (because it's in the editor), and is going to try again. The "Null Subsystem in Editor" option tells it to use a placeholder anchor system, because the real one will fail.
I just verified it is working as expected. Two gotchas to check for:
Mark, the bug appears to be in AnchorManagerXR.cs. It's missing a line here. It's missing undef'ing WLT_LOG_SETUP when WLT_DISABLE_LOGGING is defined
#if WLT_DISABLE_LOGGING
#undef WLT_EXTRA_LOGGING
#undef WLT_LOG_SETUP <------ Add this to AnachorManagerXR.cs
#endif // WLT_DISABLE_LOGGING
Others are likely not hitting this because they are using a different AnchorManager; for example AnchorManagerARF.cs.
@AMollis , it shouldn't matter whether it's defined in AnchorManagerXR.cs, it only matters whether it is defined in the file that uses it, in this case AnchorManager.cs, where the function DebugLogSetup() is defined.
Again, I tried this with the same configuration, and it behaved as expectedly. The two gotchas I mentioned are very easy to miss (I missed one of them the first time testing this).
FWIW the bug went away once I added this line. I suspect it’s some quirk with how script is compiled in editor. Note, the project we repro’ed with had the “Anchor Subsystem” set to XRSDK
Yes, I was testing with Anchor Subsystem==XRSDK.
As you say, it might be a bug in Unity. As I'm sure you have noticed, WLT_LOG_SETUP isn't even used in AnchorManagerXR.cs, so whether it is defined in that file or not should have no consequence. I would suggest you file a bug report with Unity.
Based on https://github.com/microsoft/MixedReality-WorldLockingTools-Unity/issues/205 I should be able to disable logging. But for some reason I can't get it work in editor. I've updated project settings accordingly.
But I still see many logs.
I can see that the logs do seem like they should be removed
But somehow it doesn't seem like the
#undef WLT_LOG_SETUP
is working...