Schedule(PhysicsWorld) is depricated in the new version of DOTS

When implementing the schedule task to update entities when a collision happens with the ITriggerEventsJob, in the current version of DOTS I am getting an error stating that the Schedule() with the use of a physics world is depricated and that I have to use the ‘new’ method that doesn’t take physics world. It is a bit unclear on what this ‘new’ method is though. Could someone help me point in the right direction?

Full error log:
Assets\Scripts\Systems\PersonCollisionSystem.cs(35,22): error CS0619: ‘ITriggerEventJobExtensions.Schedule(T, ISimulation, ref PhysicsWorld, JobHandle)’ is obsolete: ‘Schedule() has been deprecated. Use the new method that doesn’t take PhysicsWorld. (RemovedAfter 2021-05-01)’

Okay so I got this to work. Not sure if it is the proper implementation, but simply removing the buildPhysicsWorld from the .Schedule() will fix the error and generate the expected results.

So change:
.Schedule(stepPhysicsWorld.Simulation, ref buildPhysicsWorld.PhysicsWorld, Dependency)
To:
.Schedule(stepPhysicsWorld.Simulation, Dependency)

1 Like

Unfortunately, Unity pulled the rug out from under us with the transition from ECS 0.17 to ECS 0.50, introducing a number of breaking changes.
We’re still working on a transition guide, but this does appear to be the correct fix for this issue.

Got same problem. Believe there is a change from unity.entities 0.50 to 0.51.
This BuildPhysicsWorld seems a bit shaky…

This is part of why we are on hold in making official updates to the course. In the early days of ECS, some tutorials had a shelf life of mere weeks before Unity made breaking changes. Things were holding stable with .17 for quite a while, but the implication from Unity is that they’ll be pushing forward with more changes and are relatively (by Unity’s terms) close to the coveted 1.0 release version. We’ll be evaluating things again shortly to see where to proceed from here.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms