ISharedComponent with Burst

Hi,
by documentation I’m quite confused about the usage of ISharedComponent with burst.

if I filter entities in a Job using “WithSharedComponentFilter” and putting my data in a local variable before that, does it fully utilize burst? In addition, is there a easier method for accessing the ISharedComponent Data other than putting it in local variables?

MyISharedComponent iSharedData= MyISharedComponent;
Entities
.WithSharedComponentFilter(MyISharedComponent)
.ForEach((Entity entity, ref Translation translation) => {
    var tmp = iSharedData.tmp;
    //do stuff using
}).ScheduleParallel()

Thanks in advance!

Right now Burst will only work properly with unmanaged (struct) ISharedComponentData.

This is a holdover from when ISharedComponentData was mostly used for associated managed data with a chunk of entities (think sharing same render meshes, materials).

Now that managed objects are supported as regular components (not in jobs and burst, but available on main thread code), I believe the plan is to make ISharedComponentData more tightly integrated with ForEach if the type is struct.

This support hasn’t landed yet but should be available later this year.