how to make an object move left to right in unity2d code example
Example: unity move left and right
public float speed = 0.2f
transform.position = new Vector3(transform.position.x+speed,
transform.position.y, transform.position.z);
public float speed = 0.2f
transform.position = new Vector3(transform.position.x+speed,
transform.position.y, transform.position.z);