docs.unity3d.com
Search Results for

    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.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics.Systems
    Assembly: Unity.Physics.dll
    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 Unity.Entities.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<int>

    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()

    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.

    Implements

    IDisposable
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)