[SOLVED] Unity 5 OnClick functions don't work

After Migrating my project from 4.6 to 5 my buttons on World Space Canvas stopped working.They have functions assigned to OnClick() event:

function CameraPlus()
{
 if (which_cam < cameras.Length-1)
 {
 which_cam += 1;
 }
}

function CameraMinus()
{
 if (which_cam >0)
 {
 which_cam -= 1;
 }
}

But my which_cam variable doesn’t change when I press on them.The buttons work just as fine: they react on cursor, change colors etc.

Any help?

Also, sorry if there’s any mistakes on text.English isn’t my first language.

UPD: After checking Force Module Active in Standalone Input Module(EventSystem) it started working.Yes!

Those functions are not public here? How could you assign them? :smiley:

public void CameraPlus()

and

public void CameraMinus()

Should fix the problem. Also place a Debug.Log inside the function but outside your if and see if the function gets fired! :wink: