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 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public static void RegisterTransformChange(Transform transform, PhysicsCallbacks.ITransformChangedCallback callback)
Parameters
The transform to watch for changes.
The callback to perform when a transform change is detected.