modify rotation in unity code example
Example 1: unity how to change rotation
transform.eulerAngles = new Vector3(0f, 180f, 0f); //rotates 180 degrees
Example 2: how to chagne rotation in unity
transform.eulerAngles = new Vector3(0f, 180f, 0f); // rotates 180 degrees