How to reproduce:
- Create a new project with the "Universal 3D" template
- Open any script in Visual Studio
- Enter the Debug mode in Visual Studio (“Attach to Unity”)
- Observe the Error List in Visual Studio
Actual result: Errors prevent the build
Expected result: The build starts successfully
Reproducible with: 6000.4.0a1, 6000.4.11f1, 6000.5.0a1
Not reproducible with: 6000.0.0f1, 6000.0.77f1, 6000.3.0a6, 6000.3.17f1, 6000.5.0b12, 6000.6.0a7
Fixed in: 6000.5.0a2
Reproducible on: Windows 10 (User), Windows 11
Not reproducible on: No other environments tested
Notes:
- .csproj file must be generated for Built-in packages to reproduce (Edit > Preferences > External Tools)
- The Editor compiles successfully in both default and debug modes
- Errors:
- Code CS8168 - Cannot return local 'actualPasses' by reference because it is not a ref local [ PassesData.cs ]
- Code CS8347 - Cannot use a result of 'NativeArray<PassData>.implicit operator ReadOnlySpan<PassData>(in NativeArray<PassData>)' in this context because it may expose variables referenced by parameter 'source' outside of their declaration scope [ PassesData.cs ]