how can i divide screen to x & y axes for different resolutions

When I set a touch position for different phones it works differently.I want to divide the screen.So when player touches the left side of the screen do something,and when touches the right side do somethng.

My psychic debugging powers are telling me you are hardcoding the number in your condition.

Touch.position.x < Screen.width / 2

is touch on the left half of the screen

Touch.position.x > Screen.width / 2

is touch on the right half of the screen.

Main lesson: don’t hardcode numbers for what you know is different between devices.