Constraints latch the "target transform" on
Awake
during play mode, even if the constraint is not yet active, this makes it impossible to add a constraint and configure it on the same frame programmatically without first disabling the game object that the constraint is added to (preventing
Awake
from firing) and re-enabling the object after configuring it.