Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RegisterTransformChange(Transform, ITransformChangedCallback)

Register a transform watcher to call the specified callback when a transform changes. See PhysicsEvents.TransformChangeEvent for the types of transform changes that are watched for. You MUST unregister this when no longer needed with PhysicsWorld.UnregisterTransformChange otherwise you will receive warnings.
Read time 1 minuteLast updated 11 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public static void RegisterTransformChange(Transform transform, PhysicsCallbacks.ITransformChangedCallback callback)

Parameters

transform

The transform to watch for changes.

The callback to perform when a transform change is detected.