Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsCallbacks

All callback interfaces and targets.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public readonly struct PhysicsCallbacks

Structs

Struct

Description

PhysicsCallbacks.BodyUpdateCallbackTargetsContains all the body update callback targets returned from PhysicsWorld.GetBodyUpdateCallbackTargets.
PhysicsCallbacks.ContactCallbackTargetsContains all the contact callback targets returned from PhysicsWorld.GetContactCallbackTargets.
PhysicsCallbacks.JointThresholdCallbackTargetsContains all the joint callback targets returned from PhysicsWorld.GetJointThresholdCallbackTargets.
PhysicsCallbacks.TriggerCallbackTargetsContains all the trigger callback targets returned from PhysicsWorld.GetTriggerCallbackTargets.

Interfaces

Interface

Description

PhysicsCallbacks.IBodyUpdateCallbackAn interface that when implemented, can be called as a target by PhysicsWorld.SendBodyUpdateCallbacks.
PhysicsCallbacks.IContactCallbackAn interface that when implemented, can be called as a target by PhysicsWorld.SendContactCallbacks.
PhysicsCallbacks.IContactFilterCallbackAn interface that when implemented, can be called as a target when a PhysicsShape has _contactFilterCallbacks set to true. The PhysicsWorld the PhysicsShape is in also has to have its _contactFilterCallbacks set to true.
PhysicsCallbacks.IJointThresholdCallbackAn interface that when implemented, can be called as a target by PhysicsWorld.SendJointThresholdCallbacks.
PhysicsCallbacks.IPreSolveCallbackAn interface that when implemented by a Object, can be called as a target when a PhysicsShape has _preSolveCallbacks set to true. The PhysicsWorld the PhysicsShape is in also has to have its _preSolveCallbacks set to true.
PhysicsCallbacks.ITransformChangedCallbackAn interface that when implemented, can be called when using PhysicsWorld.RegisterTransformChange.
PhysicsCallbacks.ITransformWriteCallbackAn interface that when implemented, can be called as a target set with _transformWriteCallbackTarget.
PhysicsCallbacks.ITriggerCallbackAn interface that when implemented, can be called as a target by PhysicsWorld.SendTriggerCallbacks.