文档

Unity Engine

Unity Engine

callbackTargetCount

Get the number of distinct callback targets held by the bodies, chains, shapes and joints in the world. Objects that share the same callback target object count it once, however many of them there are.
阅读时间1 分钟最后更新于 11 天前

Definition

  • Type: Property
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public int callbackTargetCount { get; }

Remarks

See PhysicsBody.callbackTarget, PhysicsChain.callbackTarget, PhysicsShape.callbackTarget and PhysicsJoint.callbackTarget. A callback target set on a shape or joint that is destroyed along with its body, or on a chain segment destroyed along with its chain, can still be counted until the world reuses that object's handle or the world is destroyed.