#Fix can not be accessed. Nested native containers are illegal in jobs.
1 messages · Page 1 of 1 (latest)
nested native containers can't have safety injected into them
if you know what you're doing is safe use an unsafe container for nesting
[NativeDisableContainerSafetyRestriction]
public NativeArray<UnsafeList<Entity>> SpatialCells;
This is what i`m using but on latest version of ECS/Unity it does not works (2022.2.7f1)
Even with safety checks off it throws the error
@versed lava seems like your area 
Thank you, it broke my game after updating.
The line you posted is OK; what’s not allowed is to schedule a job against a component with a native container in it
You can take the native container out of the component and schedule the job against the native container directly, and that will be fine
Just to confirm @proven silo your public NativeArray<UnsafeList<Entity>> SpatialCells; is stored inside a component?
And I'm guessing you're accessing this data via ComponentLookup<> ?
(Note, ComponentLookup itself is a NativeContainer, thus accessing components with NativeContainers breaks the nesting restriction)
Was it changed on last update?