Rigidbody.drag is obsolete in Unity 6: use linearDamping

Unity 6 renamed Rigidbody drag and angularDrag to linearDamping and angularDamping, on both Rigidbody and Rigidbody2D. The rename and a version-safe fallback.

Status
Obsolete since Unity 6.0 · Physics
Old
drag, angularDrag
New
linearDamping, angularDamping
Checked
2026-10-05, against the sources below

What changed

Unity 6.0 renamed the damping properties on Rigidbody and Rigidbody2D: drag became linearDamping and angularDrag became angularDamping. The behaviour is the same; the names now match linearVelocity and angularVelocity.

The Inspector labels changed with them, so a tutorial that says to set Drag on a Rigidbody now means Linear Damping.

Before and after

Before
C#
rb.drag = 2f;
rb.angularDrag = 0.5f;
After
C#
rb.linearDamping = 2f;
rb.angularDamping = 0.5f;

Compile on Unity 2022.3 and Unity 6

For a package or asset that still supports 2022.3, branch on Unity's version define:

Both versions
C#
#if UNITY_6000_0_OR_NEWER
    rb.linearDamping = 2f;
#else
    rb.drag = 2f;
#endif

Fix it automatically

Paste a script into the Unity 6 Script Upgrade Checker and it applies this rename for you, along with the other safe fixes for your target version.

Open this example in the checker

Questions

Do the drag values I set in the Inspector change?
No. Values saved in your scenes and prefabs carry over to the renamed fields; only the script API and the Inspector labels changed. A Rigidbody that had Drag 2 shows Linear Damping 2.
Is linearDamping tuned differently from drag?
No. The damping model is the same, so the same numbers give the same feel. If movement feels different after an upgrade, look at other physics changes in that version rather than this rename.

Sources

Related Unity 6 changes

Every Unity 6.x change, by version