TL;DR
Profiled it, and the cost for either method seemed relatively low if not slightly in favor of using Physics.SyncTransforms(). However, if you have a much higher framerate than your physics step, it may make sense to use enable/disable if you’re frequently trying to move a player controller.
Long answer:
I figured I’d give this a test - I grabbed unity’s 3rd person demo scene, threw in an extra 2000 modest complexity lumpy meshes with mesh colliders and had them randomly rotate to discourage any caching or sneaky stuff. I then threw in 1200 of that same mesh, this time with rigidbodies to give unity something to calculate, and let them bounce off the rotating ones, player, and scene.
Wrote two warp methods, one wrapping the transform update in enable/disable, one where I call Physics.SyncTransforms(), and configured the scene so I’d warp with one style when pressing 1, and another when pressing 2. Results as follows:
Force Sync | Enable/Disable
---------------------------
0.032ms | 0.048ms (enable/disable tested first)
0.046ms | 0.045ms (enable/disable tested first)
0.033ms | 0.052ms (enable/disable tested first)
0.031ms | 0.051ms (physics sync tested first)
0.037ms | 0.044ms (physics sync tested first)
0.028ms | 0.052ms (physics sync tested first)
(Rows of data were not collected on the same frame, but in close proximity: For example, I’d press 2 then 1 and pause the profiler. Objects were allowed to settle at the beginning of the frame for two seconds so I could even operate the profiler.)
The difference appears to be negligible if not slightly in favor of Physics.SyncTransforms(), tho frame times were in the 30-40ms range. So does this mean Physics.SyncTransforms() is better? Not quite.
I noticed that unity calls SyncColliderTransform every fixed update anyways, which in my setup was taking an extra 4ms or so depending on what lumps tumbled where. I forced both warp styles to run on frames without fixed update and in that situation, Physics.SyncTransforms() would cost its usual plus that extra 4ms. Enable/Disable didn’t have that extra cost, so depending on your title or physics setup it may make sense to use one over the other.
If there’s a way to call Physics.SyncTransforms() but specify a specific transform, that’s probably the best of both worlds, but at time of writing I’ve not found something for that.