Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.0.0
Issue ID
ECSB-202
Regression
No
"DOTS source generators" error when using "#if" directives in imports
Reproduction steps:
1. Open “MinProject“
2. Enter Safe Mode if prompted (otherwise opening gets stuck at Completing Domain)
3. Observe the Console
Expected result: no SGICE003 error
Actual result: an SGICE003 error
Reproduced in: 1.0.0-pre.47 (2022.2.10f1, 2023.1.0b7, 2023.2.0a5)
Could not test in: 0.51.1-preview.21 (2020.3.46f1, 2021.3.20f1) (Baker<> not supported)
Reproduced using: macOS 13.0.1 (Intel), Windows 11 (by the reporter)
Note: not reproduced when removing/commenting the first “#if UNITY_EDITOR” and “#endif“ directives
Errors:
1. Assets/TestAuthoring.cs(1,1): error SGICE003: This error indicates a bug in the DOTS source generators. We'd appreciate a bug report (Help -> Report a Bug...). Thanks! Error message: 'System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'count') |--| at System.Text.StringBuilder.Insert(Int32 index, String value, Int32 count) |--| at Unity.Entities.SourceGen.Common.TypeCreationHelpers.GenerateSourceTextForRootNodes(String generatedSourceFilePath, BaseTypeDeclarationSyntax originalSyntax, String generatedSyntax, CancellationToken cancellationToken) |--| at Unity.Entities.SourceGen.JobEntity.JobEntityGenerator.Execute(SourceProductionContext context, Compilation compilation, StructDeclarationSyntax candidate, String projectPath, Boolean performSafetyChecks, Boolean outputSourceGenFiles)'.
2. Assets/TestAuthoring.cs(36,25): error CS0117: 'TestJob' does not contain a definition for 'InternalCompiler'
3. Assets/TestAuthoring.cs(39,50): error CS0315: The type 'TestJob' cannot be used as type parameter 'T' in the generic type or method 'JobChunkExtensions.ScheduleParallel<T>(T, EntityQuery, JobHandle)'. There is no boxing conversion from 'TestJob' to 'Unity.Entities.IJobChunk'.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note:
There are no fixes planned for this Bug