#Fix can not be accessed. Nested native containers are illegal in jobs.

1 messages · Page 1 of 1 (latest)

proven silo
#

How do i fix this error if i know it is safe to access nested native containers?

flat spruce
#

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

proven silo
#

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

fierce vector
#

@versed lava seems like your area think

proven silo
#

Thank you, it broke my game after updating.

versed lava
#

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

cunning lynx
#

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)

proven silo
#

Was it changed on last update?