Debug.isDebugBuild always true

We are seeing that Debug.isDebugBuild is always true for Vision OS builds. #if DEVELOPMENT_BUILD does seem to work correctly though.

            var test = true;
            var test = false;
            Debug.Log($"Debug? - {test} {Debug.isDebugBuild}");

We see the following log with the above:

Debug? - False True

Debug.isDebugBuild works fine in our builds for iOS, tvOS, macOS, but for VisionOS it doesn’t appear to be working.

We are on Unity 2022.3.12f1, Xcode 15.1 beta 1, polyspatial packages 0.5.0.

This looks like there may be an issue with the Unity integration. Please file a bug and report the bug id here.

I tried this on 0.3.2 packages and isDebugBuild seemed to report correctly, but when trying on 0.5.0 packages it always reports true for me. We haven’t updated to 0.6+ yet to try it.

IN-61425 submit bug report. Has a Test.cs script that just logs on Start() where you can see the issue.

Are you by chance running in the Editor? That should only be true if this is a DEVELOPMENT_BUILD or in the Editor.

This is building to simulator. Yes in editor we see that #DEVELOPMENT_BUILD is false while Debug.isDebugBuild is true, but that is to be expected I believe. All reports above are building through Xcode to simulator or device.

And I assume you don’t have “Development Build” set in build settings?

That’s correct.

still and issue!