So i upgraded to Unity 5 and i knew some stuff would break with the transition but it had to happen. My Buttons that are configured in a bool setting like Menu buttons work fine but my Touch buttons to move left and right no longer work.
Everything is configured correctly on the canvas.
My Script i use for the buttons.
public void PlayerMove(float move)
{
GetComponent<Rigidbody>().velocity = new Vector3(move*PlayerSpeed, GetComponent<Rigidbody>().velocity.y);
GetComponent<Rigidbody>().velocity = Vector3.ClampMagnitude(GetComponent<Rigidbody>().velocity, 10f);
}
The one i use for shoot which works in the same script is
public void PlayerShoot(bool shoot)
{
Vector3 position = new Vector3(transform.position.x, transform.position.y + (transform.localScale.y / 2));
Instantiate(ProjectilePrefab, position, Quaternion.identity);
}
Just to give you an idea how i have it set up.
Just to get the obvious out of the way the movement does work when i change it to keyboard set up but that does not help me considering it is a mobile game.