Setting the velocity directly vs adding an IMPULSE force

Is there a difference between the two?

Setting the velocity directly:

theRigidBody.velocity = transform.forward * velocityMultiplier;

Adding IMPULSE force:

theRigidBody.AddForce(transform.forward * velocityMultiplier, ForceMode.Impulse);

setting force directly cancels out all other force, while AddForce adds the force.

So with this code:

theRigidBody.velocity = transform.forward * velocityMultiplier;
theRigidBody.velocity = -transform.forward * velocityMultiplier;

ends you up with the velocity from the second line. This code, on the other hand:

theRigidBody.AddForce(transform.forward * velocityMultiplier, ForceMode.Impulse);
theRigidBody.AddForce(-transform.forward * velocityMultiplier, ForceMode.Impulse);

should end you up with zero velocity.

Note that ForceMode.Impulse also takes the mass of the rigidbody into account. See this page for what the ForceModes does. In theory, if the object is at a standstill, using AddForce with Forcemode.VelocityChange should be exactly the same as setting velocity.