Version: 2022.2
言語: 日本語
public static bool autoSyncTransforms ;

説明

Set whether to automatically sync changes to the Transform component with the physics engine.

When a Transform component changes, any Rigidbody2D or Collider2D on that Transform or its children may need to be repositioned, rotated or scaled depending on the change to the Transform. You can control if the changes made to the Transform are automatically applied to the correct components by setting this property true. When set to false, synchronization only occurs prior to the physics simulation step during the Fixed Update. You can also manually synchronize transform changes using Physics2D.SyncTransforms.

Note: When autoSyncTransforms is set to true, repeatedly changing a Transform and then performing a physics query can cause performance loss. To avoid affecting performance, set autoSyncTransforms to false if you want to perform multiple Transform changes and queries in succession. You should only set autoSyncTransforms to true for physics backwards compatibility in existing projects made before Unity 2017.2. For projects made in Unity 2017.2 onwards, turn this option off.