Search Issue Tracker
Won't Fix
Won't Fix in 1.0.X
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
- An "InvalidOperationException" error is thrown when TryRemoveItem is used with rebuildTree set to false
- Build fails with IL2CPP error when building on Android platform in a specific project
- Resize to Fit option for Import Activity window's Columns does nothing
- Cell template field is reset and an "ArgumentException" is thrown when template was edited and UI Document is reopened
- Broken hyperlink formatting in HDRP 3D Sample Tutorials
Resolution Note:
There are no fixes planned for this Bug
Resolution Note (1.0.X):
There are no fixes planned for this Bug