I have a decent number of jobs that share the same set of type handles. I would like to combine them into a single struct like:
public struct CombinedTypeHandles<T> where T : struct
{
public ComponentTypeHandle<A> ATypeHandle;
public ComponentTypeHandle<B> BTypeHandle;
public ComponentTypeHandle<C> CTypeHandle;
public ComponentTypeHandle<T> TTypeHandle;
}
Will this cause issues with concurrent access? I assume I can’t mark the outer struct as [ReadOnly] in a job, but if I construct each type handle with the correct isReadOnly argument will ECS/Burst still optimize access?