OK, I finally have something that's working satisfactorily. Here's what I'm currently using:
float duration;
if (Random.value < 0.5)
{
// Horizontal motion
duration = Random.Range(2.5f, 4);
transform.position = new Vector3(ScreenManager.ScreenLeftWorld, transform.position.y);
_tween = transform.DOMoveX(ScreenManager.ScreenRightWorld, duration);
}
else
{
// Vertical motion
duration = Random.Range(1, 2);
float vertDist = Random.Range(.5f, 1f);
transform.position = new Vector3(transform.position.x, transform.position.y - vertDist);
_tween = transform.DOMoveY(transform.position.y + vertDist, duration);
}
_tween.SetAutoKill(false)
.SetEase(Ease.InOutSine)
.SetLoops(-1, LoopType.Yoyo);
_tween.Goto(Random.Range(0, duration));
_tween.Play();
}
Essentially, I physically move my platform to one end of the linear motion just prior to creating a tween to the other end of the motion. Then, I set the tween to loop infinitely with an appropriate ease-type.
Next, I attempt to randomize the starting location by calling _tween.Goto(0, duration). Which, I think, should push the start timeline to somewhere between the defined start and end. Finally, I start the tween.
I was trying to do this with a Sequence of 2 DoMove tweens (one for both passes until I realized I could just use a loop). Initially, I left the Sequence, but eliminated one of the 2 tweens - in favor of setting up looping. So, basically, I had the same code as above, but with a Sequence containing only a single tween. However, the easing did not work the same at both ends of the motion. I'm not sure if that's expected or a bug, but it seems like it should have worked the same way.
Anyway, problem solved.