here is my code:
Rigidbody2D myRigid;
// Use this for initialization
void Start () {
myRigid = this.gameObject.GetComponent<Rigidbody2D> ();
myRigid.MovePosition (new Vector2 (myRigid.position.x + 1f, myRigid.position.y));
//InvokeRepeating ("Move", 1f, 1f);
}
When i ran by clicked button play in Unity Editor, the object only moved 1 time.
But when i built in web player, the object moved forever.
But if i use:
this.gameObject.transform.Translate (new Vector2 (1, 0)) ;
It worked fine, moved only 1 time.