文档

Unity Engine


User Manual

Script Reference

Unity Engine


GetBodyUpdateOwnerUserData(Allocator)

Get all PhysicsBody.ownerUserData assigned to each PhysicsBody returned with PhysicsWorld.bodyUpdateEvents. The Native Array returned will be of the same length and be ordered the same as the PhysicsEvents.BodyUpdateEvent returned with PhysicsWorld.bodyUpdateEvents. Any PhysicsBody that are not valid will return a default PhysicsUserData.
阅读时间1 分钟最后更新于 1 个月前

Definition

public NativeArray<PhysicsUserData> GetBodyUpdateOwnerUserData(Allocator allocator = Allocator.Temp)

Parameters

allocator

The memory allocator to use for the results. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent.

Returns