System reads X via Y but that type was not assigned to the dependency Property

Can you guys help me with this error message? I dont understand it tbh, as iam already doing this.

TimeTravelCollectibleTransformSystem has a single Job which is defined like this:

Dependency = Entities
.WithName("TimeTravelTransform_Collectibles")
.ForEach((..., in BlockData blockdata) => {
//code
}).Schedule(Dependency);

I think your issue would not be in this system, but in another one that writes to BlockData.

I got this error again, slightly different:

This time, still the same “start” system: TimeTravelCollectibleTransformSystem, but this time via a different system:
BlockAnimationSystem:Update_LambdaJob1

Being from a different system seems to be unusual, here was someone having a similar problem. Something is probably not right with the dependency in the other system.

BTW if you don’t need complex dependencies(ie multiple jobs in a system are logically allowed run at the same time), you can omit passing Dependency to the ForEach, the jobs will automatically chain together in the order they are defined without manually using Dependency.

I know that i can omit passing the Dependency to the Schedule() method, but to me it looks like it fails in the codgen, so i want to make everything as explicit as possible for the code generator :slight_smile:

I just reversed some code where some “weird” stuff happens and it looks like i cannot run this code here:

protected override void OnStopRunning()
{
  Dependency = Entities.ForEach((ref BasslineAnimation basslineAnimation, in BlockData blockData) =>
    {
      basslineAnimation.Value = float4.zero;
    })
    .Schedule(Dependency);
}

Is it not possible to run jobs in OnStopRunning() etc?

Maybe not, at least not ForEach, I had dependency issues when I was trying to add my own update methods and had to call them from OnUpdate() to get it working without calling .Complete().

OnStopRunning() is called when there are no entities matching the system, so updating the Dependency with a ForEach there could be a logical error so it never gets run.