For context, I’m a upgrading an existing project that was already big with lots of systems. Followed the upgrade guide, fixed compiler errors, and I can now finally run the game. But just at startup, there’s an error at DefaultWorldInitialization:
IndexOutOfRangeException: NewLength 32 is out of range of '31' Capacity.
Unity.Collections.FixedList.CheckResize[BUFFER,T] (System.Int32 newLength) (at ./Library/PackageCache/com.unity.collections@2.1.0-pre.18/Unity.Collections/FixedList.gen.cs:451)
Unity.Collections.FixedList128Bytes`1[T].set_Length (System.Int32 value) (at ./Library/PackageCache/com.unity.collections@2.1.0-pre.18/Unity.Collections/FixedList.gen.cs:2791)
Unity.Collections.FixedList128Bytes`1[T].AddNoResize (T& item) (at ./Library/PackageCache/com.unity.collections@2.1.0-pre.18/Unity.Collections/FixedList.gen.cs:2944)
Unity.Collections.FixedList128Bytes`1[T].Add (T& item) (at ./Library/PackageCache/com.unity.collections@2.1.0-pre.18/Unity.Collections/FixedList.gen.cs:2919)
Unity.Entities.ComponentSystemSorter.FindConstraints$BurstManaged (System.Int32 parentTypeIndex, Unity.Collections.LowLevel.Unsafe.UnsafeList`1[Unity.Entities.ComponentSystemSorter+SystemElement]* sysElemsPtr, Unity.Collections.NativeHashMap`2[System.Int32,System.Int32]* lookupDictionary, Unity.Entities.TypeManager+SystemAttributeKind afterkind, Unity.Entities.TypeManager+SystemAttributeKind beforekind, Unity.Collections.NativeHashSet`1[System.Int32]* badSystemTypeIndices) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:579)
Unity.Entities.ComponentSystemSorter+FindConstraints_000001CB$BurstDirectCall.Invoke (System.Int32 parentTypeIndex, Unity.Collections.LowLevel.Unsafe.UnsafeList`1[Unity.Entities.ComponentSystemSorter+SystemElement]* sysElemsPtr, Unity.Collections.NativeHashMap`2[System.Int32,System.Int32]* lookupDictionary, Unity.Entities.TypeManager+SystemAttributeKind afterkind, Unity.Entities.TypeManager+SystemAttributeKind beforekind, Unity.Collections.NativeHashSet`1[System.Int32]* badSystemTypeIndices) (at <c6f736424996433b875379f5f7b53de2>:0)
Unity.Entities.ComponentSystemSorter.FindConstraints (System.Int32 parentTypeIndex, Unity.Collections.LowLevel.Unsafe.UnsafeList`1[Unity.Entities.ComponentSystemSorter+SystemElement]* sysElemsPtr, Unity.Collections.NativeHashMap`2[System.Int32,System.Int32]* lookupDictionary, Unity.Entities.TypeManager+SystemAttributeKind afterkind, Unity.Entities.TypeManager+SystemAttributeKind beforekind, Unity.Collections.NativeHashSet`1[System.Int32]* badSystemTypeIndices) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemSorter.cs:530)
Unity.Entities.ComponentSystemGroup.GenerateMasterUpdateList () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:438)
Unity.Entities.ComponentSystemGroup.RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:372)
Unity.Entities.ComponentSystemGroup.RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:381)
Unity.Entities.ComponentSystemGroup.RecurseUpdate () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:381)
Unity.Entities.ComponentSystemGroup.SortSystems () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/ComponentSystemGroup.cs:559)
Unity.Entities.DefaultWorldInitialization.AddSystemToRootLevelSystemGroupsInternal (Unity.Entities.World world, System.Collections.Generic.IEnumerable`1[T] systemTypesOrig) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:278)
Unity.Entities.DefaultWorldInitialization.Initialize (System.String defaultWorldName, System.Boolean editorWorld) (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities/DefaultWorldInitialization.cs:154)
Unity.Entities.AutomaticWorldBootstrap.Initialize () (at ./Library/PackageCache/com.unity.entities@1.0.0-pre.65/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs:16)
It has something to do with the system sorting but how do I know which systems are the culprits?