A list of hints for anyone having trouble with click events

My canvas isn’t blocking clicks! (defenders are being spawned when clicking the Restart / Main menu buttons)

  • Make sure your canvas has a 2D box collider, and that the collider is covering the area.
  • Also make sure it is in front of the ‘Core Game Area’ collider

My button isn’t clickable!

  • Try the 3D view and make sure your buttons are closer to the camera (but not behind it!) i.e. -0.5 Z
  • As per the other thread, make sure an EventSystem exists in the hierarchy (should get auto-created when you add a canvas - note that adding a canvas via prefab may not create it)

I’m having merry hell getting all this working, why does Unity make this so hard!

  • Watch the video closely and check your colliders - as we’re using some wacky scaling values here for things it’s easy for colliders to be microscopic in size
1 Like

Privacy & Terms