Reproduction steps:
- Open the attached “IN-139496” project
- Open the “EntitiesGraphicsSystem.cs” script (PackageCache/com.unity.entities.graphics@0c58e11f3f42/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs)
- Add breakpoints at the following locations:
- static unsafe void RootsHandlerDelegate (In 1.4.18, line 708)
- static void EditorInitializeOnLoadMethod (In 1.4.18, line 731)
- In Build Settings, enable “Development build”, “Script Debugging” and “Wait for Managed Debugger”
- Make sure Managed Stripping is enabled (Set to anything other than Disabled)
- Build and Run the Standalone Player
- Connect the Managed Debugger
- In the Player, click the “Unload” button
- Open the Debugger and observe
- Optionally, Click “Reflect” and observe the Player.log
Actual results: The breakpoint doesn’t stop the code (“RootsHandlerDelegate” wasn’t called) and “GetAdditionalRoots” has been stripped from “ResourcesAPIInternal.EntitiesAssetGC”
Expected results: The breakpoint activates stopping the code (“RootsHandlerDelegate” gets called) and “GetAdditionalRoots” doesn’t get stripped
Reproducible with: 1.4.18 (6000.0.73f1), 6.4.0 (6000.4.2f1), 6.5.0 (6000.5.0b3)
Reproducible on: Windows 11 (by reporter), macOS 26.4 (M3 Max)
Workaround: Open “link.xml” (Assets/link.xml) and uncomment the elements within, re-run the test