Unity UI Button not calling the Onclick method
<p>I have a button under a canvas that is suppose to restart the scene. But instead its not calling the intended function of attached script.</p>
<p>On Unity Forums, I found solutions like it should be at higher hierarchy in canvas, and the canvas should have a graphic raycast and so-on.</p>
<p>But it still isn't working, although its on click array detects the intended method it is suppose to call.</p>
<p>Scene Editor with Canvas Selected:</p>
<p><img src="https://i.stack.imgur.com/7GXiL.png" alt="2" /></p>
<p>Scene Editor with Button Selected:</p>
<p><img src="https://i.stack.imgur.com/HQYUt.png" alt="1" /></p>