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
- Unity Events added to a ScriptableObject are not invoked if they are added in Edit mode and their Call State is set to "Runtime Only"
- The Visual Effect GPU Event is forced into sleep until another Event is sent when the visual effect consists of two particle systems that communicate with Trigger Event set to On Die
- Nativeplugin Vulkan image gets deleted while in use and AccessTexture returns an invalid texture causing a crash or corruption when QualitySettings.anisotropicFiltering is called
- Error "DllNotFoundException: __Internal assembly:<unknown assembly> type:<unknown type> member:(null)" when attaching a managed debugger for the build of a specific project with Mono Scripting Backend
- Unable to select UI Toolkit Foldout element when using a gamepad controller
Resolution Note:
There are no fixes planned for this Bug