The following code compiles as expected:
public class InterpolateTransformSystem : JobComponentSystem {
protected override JobHandle OnUpdate(JobHandle inputDeps) {
Entities.ForEach((ref Translation t, ref Rotation rot, in InterpolateTransform lerp) => {
});
return default;
}
}
while the following, which inherits from “ComponentSystem”, does not:
public class InterpolateTransformSystem2 : ComponentSystem {
protected override void OnUpdate() {
Entities.ForEach((ref Translation t, ref Rotation rot, in InterpolateTransform lerp) => {
});
}
}
The code for the InterpolateTransform is as follows:
public struct InterpolateTransform : IComponentData {
public float3 From;
public float3 To;
}
Rider states the following:
The type ‘Unity.Entities.EntityQueryBuilder’ must be convertible to ‘Unity.Entities.CodeGeneratedJobForEach.ISupportForEachWithUniversalDelegate’ in order to use it as parameter ‘TDescription’ in the generic method ‘TDescription LambdaForEachDescriptionConstructionMethods.ForEach<TDescription,T0,T1,T2>(this TDescription, RRI<T0,T1,T2>)’
This is using the following versions:
“com.unity.burst”: “1.2.0-preview.11”,
“com.unity.entities”: “0.4.0-preview.10”,
“com.unity.jobs”: “0.2.2-preview.6”,
“com.unity.mathematics”: “1.1.0”,