So I have been making this 2D game in Unity and it has buttons on the left all the time. The buttons are actually objects with no text and a sprite, which are supposed to stay on one place and activate a function on click (the function works).
I have tried using this simple script, but it appears to not be working, even after adding hitboxes/rigibodies to the object: { public int TerraformClick;
void Update()
{
if(Input.GetMouseButtonDown(1) == true)
{
float TerraformClick = 1;
print("Changed TerraformClick");
}
}
So I just want to ask what the errors are, if there are some (none popped out)