Copyright © 2026 Unity Technologies
How to reproduce:
1. Open the “TransformAspect_Bug“ project
2. When prompted, Enter Safe Mode
3. Observe the Console
Expected result: only the “The type or namespace name 'TransformAspect' could not be found” error is logged
Actual result: “The type or namespace name 'TransformAspect' could not be found” and “This error indicates a bug in the DOTS source generators” errors are logged
Reproduced with: 1.0.8, 1.0.10 (2022.3.2f1)
Reproduced on: Windows 10 (by reporter), Windows 11
Notes:
1. An example of the Script is attached as “DOTSSourceBug.cs”
2. “TransformAspect” API has been removed in Entities Package 1.0.0-pre.65 version
“DOTS source generators” error:
Assets\TransformAspectTest.cs(2,1): error SGICE002: This error indicates a bug in the DOTS source generators. We'd appreciate a bug report (Help -> Report a Bug...). Thanks! Error message: 'System.IndexOutOfRangeException: Index was outside the bounds of the array. |--| at System.Collections.Immutable.ImmutableArray`1.get_Item(Int32 index) |--| at Unity.Entities.SourceGen.SystemGenerator.SystemAPI.Query.IdiomaticCSharpForEachDescription.<TryGetQueryDatas>g__TryGetIdiomaticCSharpForEachQueryType|73_0(ITypeSymbol typeSymbol, Location errorLocation) |--| at Unity.Entities.SourceGen.SystemGenerator.SystemAPI.Query.IdiomaticCSharpForEachDescription.TryGetQueryDatas(ICollection`1& queryTypes) |--| at Unity.Entities.SourceGen.SystemGenerator.SystemAPI.Query.IdiomaticCSharpForEachDescription..ctor(SystemDescription systemDescription, QueryCandidate queryCandidate, Int32 numForEachsPreviouslySeenInSystem) |--| at Unity.Entities.SourceGen.SystemGenerator.SystemAPI.Query.IdiomaticCSharpForEachModule.RegisterChangesInSystem(SystemDescription systemDescription) |--| at Unity.Entities.SourceGen.SystemGenerator.SystemGenerator.Execute(GeneratorExecutionContext context)'
Issues you vote on will appear here