So, i have this script:
namespace Game.Systems {
using Unity.Entities;
using Unity.Burst;
using Game.Data;
using Unity.Jobs;
using UnityEngine;
public class InputSystem : JobComponentSystem {
[BurstCompile]
struct InputJob : IJobForEach<InputData> {
public float horizontalAxis;
public float verticalAxis;
public void Execute(ref InputData inputData) {
inputData.Horizontal = horizontalAxis;
inputData.Vertical = verticalAxis;
}
}
protected override JobHandle OnUpdate(JobHandle inputDeps) {
InputJob job = new InputJob() {
horizontalAxis = Input.GetAxis("Horizontal"),
verticalAxis = Input.GetAxis("Vertical")
};
return job.Schedule(this, inputDeps);
}
}
}
and i’m receiving this error:
when i remove the interface the error goes away, so i don’t know what to do.
Is this an error in this interface or am i doing something wrong?
I followed the example in Using IJobForEach | Package Manager UI website
