fix: line number support for unity 6.5 and newer - #2805
Conversation
Start Unity Editor with --link-symbols in its process environment to determine whether Linux Bee reads the setting before build preprocessing. Refs #2805 Co-Authored-By: OpenCode <noreply@openai.com>
The process-start linker argument reached UnityLinker but did not restore Linux source resolution, so remove the temporary CI override. Refs #2805 Co-Authored-By: OpenCode <noreply@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7844761. Configure here.
| if ($script:Platform -in "WebGL", "Linux") { | ||
| Set-ItResult -Skipped -Because "Source-line assertions are unsupported on $script:Platform" | ||
| return |
There was a problem hiding this comment.
Bug: The test skip condition checks for $script:Platform being "Linux", but for Linux builds, it's set to "Desktop". This causes a test to run when it should be skipped.
Severity: MEDIUM
Suggested Fix
Update the skip condition to correctly identify the Linux environment. Since Linux builds set $script:Platform to "Desktop", the condition should be modified to account for this. For example, you could check if $IsLinux is true when $script:Platform is "Desktop", or adjust the platform value assignment in integration-test.ps1.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: test/IntegrationTest/Integration.Tests.ps1#L352-L354
Potential issue: The test skip condition `if ($script:Platform -in "WebGL", "Linux")` is
intended to prevent a line number assertion test from running on Linux. However, the
build script sets `$script:Platform` to "Desktop" for Linux environments. As a result,
the condition is never met on Linux, and the test proceeds to run. This test is expected
to fail on Linux because the `--link-symbols` feature, which is necessary for correct
line number resolution, is not supported. This will cause the CI pipeline to fail for
Linux builds, contrary to the author's intent to exclude Linux from this specific test.

Context
In Unity 6.3 and older, when building the game you'd end up with an output folder looking like that
The
Manageddirectory would contain all the stripped down.dlland matching.pdbfiles. Starting with 6.5 theManagedfolder contains the.dllonly. To get to the.pdbyou will need to do a Development build and opt-in toScript Debugging. Not ideal.What this does
These options provide the UnityLinker with the additional argument
--link-symbols.So starting with Unity 6.5 on top of adding
--emit-source-mappingto IL2CPP we need to add this argument when the UnityLinker gets invoked. Since there are no callbacks and the backdoor ofAdditionalIl2CppArgumentsonly works for IL2CPP we're putting it on the environment in the pre-build-step to be picked up.We'll need to find a less brittle way of getting to the debug symbols
Before
After
Testing
We're now also validating that the stack trace on the resulting events coming from the integration tests do have correct line numbers.