Class PhysicsWorldExporter
Utilities for exporting physics world data to ECS components.
Inheritance
PhysicsWorldExporter
Syntax
public static class PhysicsWorldExporter
Methods
Copies CollisionWorld from specified PhysicsWorld to CollisionWorldProxy component of entities returned by specified query (run on current thread).
Needs a system to get read/write handle to CollisionWorldProxy.
Declaration
public static void CopyCollisionWorldImmediate(SystemBase system, ref PhysicsWorldExporter.SharedData sharedData, in PhysicsWorld world, EntityQuery collisionWorldProxyEntities)
Parameters
Copies positions and velocities of all dynamic bodies from specified PhysicsWorld to ECS components of entities returned by specified query (run on current thread)
Needs a system to get read/write handles to Translation, Rotation and PhysicsVelocity.
Declaration
public static void ExportPhysicsWorldImmediate(SystemBase system, in PhysicsWorld world, EntityQuery dynamicEntities)
Parameters
ScheduleCollisionWorldCopy(SystemBase, ref PhysicsWorldExporter.SharedData, in PhysicsWorld, in JobHandle, EntityQuery)
Schedules a job that copies CollisionWorld from specified PhysicsWorld to CollisionWorldProxy component of entities returned by specified query.
Needs a system to get read/write handle to CollisionWorldProxy.
Declaration
public static JobHandle ScheduleCollisionWorldCopy(SystemBase system, ref PhysicsWorldExporter.SharedData sharedData, in PhysicsWorld world, in JobHandle inputDep, EntityQuery collisionWorldProxyEntities)
Parameters
Returns
SchedulePhysicsWorldExport(SystemBase, in PhysicsWorld, in JobHandle, EntityQuery)
Schedules a job that copies positions and velocities of all dynamic bodies from specified PhysicsWorld to ECS components of entities returned by specified query.
Needs a system to get read/write handles to Translation, Rotation and PhysicsVelocity.
Declaration
public static JobHandle SchedulePhysicsWorldExport(SystemBase system, in PhysicsWorld world, in JobHandle inputDep, EntityQuery dynamicEntities)
Parameters
Returns