docs.unity3d.com
    Show / Hide Table of Contents

    Class PhysicsWorldExporter

    Utilities for exporting physics world data to ECS components.

    Inheritance
    Object
    PhysicsWorldExporter
    Namespace: Unity.Physics.Systems
    Syntax
    public static class PhysicsWorldExporter

    Methods

    CopyCollisionWorldImmediate(SystemBase, ref PhysicsWorldExporter.SharedData, in PhysicsWorld, EntityQuery)

    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
    Type Name Description
    SystemBase system
    PhysicsWorldExporter.SharedData sharedData
    PhysicsWorld world
    EntityQuery collisionWorldProxyEntities

    ExportPhysicsWorldImmediate(SystemBase, in PhysicsWorld, EntityQuery)

    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
    Type Name Description
    SystemBase system
    PhysicsWorld world
    EntityQuery dynamicEntities

    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
    Type Name Description
    SystemBase system
    PhysicsWorldExporter.SharedData sharedData
    PhysicsWorld world
    JobHandle inputDep
    EntityQuery collisionWorldProxyEntities
    Returns
    Type Description
    JobHandle

    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
    Type Name Description
    SystemBase system
    PhysicsWorld world
    JobHandle inputDep
    EntityQuery dynamicEntities
    Returns
    Type Description
    JobHandle
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023