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
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Resolution Note:
There are no fixes planned for this Bug