Level Lost Canvas Does Not Block Buttons in Unity 2018.3

I have upgraded to Unity 2018.3. Glitch Garden up to this Lesson is working correctly. I have viewed the video for this lesson multiple times and have compared my settings & code to the video. All works except that the Level Lost Canvas does not block clicking the defender buttons. I am able to click them, but cannot place them. Level Lost Canvas in 10 in the Order in Layer. Each button is 7.

Here is the Inspector for the Level Lost Canvas:

My workaround for this issue:

Inset the following code

if (Time.timeScale <= Mathf.Epsilon) { return: }

as the first statement in OnMouseDown() in DefenerButton.cs and DefenderSpawner.cs

Very nice, works perfectly. Thank you :slight_smile:

SO I had the same problem, the “You Lose” canvas wasnt blocking the buttons. I came here and saw this topic, tried the solution suggested and nothing. I went back to my project, checked the arrangement of all my game elements in 3D space… the “You Lose” canvas was just WAY behind it all. :sweat_smile: I moved it forward, towards the camera and above everything else and now it all works perfectly. :slight_smile:

Privacy & Terms