PhysicsWorld.TransformTweenMode
Defines if and how Transform tweens are calculated and/or written.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Enum
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public enum PhysicsWorld.TransformTweenMode
Fields
Value | Description |
|---|---|
| Custom | Transform tweens are not calculated or written. Instead, the callback target set with _transformWriteCallbackTarget which must implement PhysicsCallbacks.ITransformWriteCallback will be have PhysicsCallbacks.ITransformWriteCallback.OnTransformTweenWrite called allowing custom transform tween writing. |
| Off | Transform tweens are not calculated or written. |
| Parallel | Transform tweens are calculated and written in parallel using a TransformAccess. |
| Sequential | Transform tweens are calculated and written linearly on a single thread, likely the main-thread. This may be faster than using PhysicsWorld.TransformTweenMode.Parallel if the majority of the Transform are not split across hierarchies so that they can be written in parallel. To further clarify, if most of the Transform are not interleaved across different hierarchies, this non-parallel (sequential) mode may be faster than PhysicsWorld.TransformTweenMode.Parallel, because it avoids the overhead of splitting and synchronizing work across multiple threads when there is not enough independent hierarchy work to parallelize efficiently. |