docs.unity3d.com
    Show / Hide Table of Contents

    Struct PhysicsWorldData

    Structure containing PhysicsWorld and other data and queries that are necessary for simulating a physics world. Note: it is important to create PhysicsWorldData and use it (to schedule physics world build) in the same system. Creating it in one system, and calling the Schedule() methods in another can cause race conditions.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Physics.Systems
    Syntax
    public struct PhysicsWorldData : IDisposable

    Constructors

    PhysicsWorldData(ref SystemState, in PhysicsWorldIndex)

    Constructor.

    Declaration
    public PhysicsWorldData(ref SystemState state, in PhysicsWorldIndex worldIndex)
    Parameters
    Type Name Description
    SystemState state

    [in,out] The SystemState of the system in which you want to use PhysicsWorldData.

    PhysicsWorldIndex worldIndex

    Zero-based index of the world.

    Fields

    ComponentHandles

    The component handles. Stores the information about ECS component handles needed for generating a PhysicsWorld

    Declaration
    public PhysicsWorldData.PhysicsWorldComponentHandles ComponentHandles
    Field Value
    Type Description
    PhysicsWorldData.PhysicsWorldComponentHandles

    DynamicEntityGroup

    Group in which the dynamic bodies belong to.

    Declaration
    public EntityQuery DynamicEntityGroup
    Field Value
    Type Description
    EntityQuery

    HaveStaticBodiesChanged

    A flag indicating if the static bodies have changed in this frame.

    Declaration
    public NativeReference<int> HaveStaticBodiesChanged
    Field Value
    Type Description
    NativeReference<Int32>

    JointEntityGroup

    Group in which the joints belong to

    Declaration
    public EntityQuery JointEntityGroup
    Field Value
    Type Description
    EntityQuery

    PhysicsWorld

    The physics world.

    Declaration
    public PhysicsWorld PhysicsWorld
    Field Value
    Type Description
    PhysicsWorld

    StaticEntityGroup

    Group in which the static bodies belong to

    Declaration
    public EntityQuery StaticEntityGroup
    Field Value
    Type Description
    EntityQuery

    Methods

    Dispose()

    Free stored memory.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    Update(ref SystemState)

    Calls the Update(ref SystemState) of the handles stored in this object. />

    Declaration
    public void Update(ref SystemState state)
    Parameters
    Type Name Description
    SystemState state

    [in,out] The state.

    Back to top
    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