How can I make a canvas appear on trigger for a 2D game?

I’m doing a sidescroller with a math minigame, but I don’t understand how to make my minigame canvas appear from using an object as the trigger when I’m in range, can someone help? I’ve only found solutions for 3D games on the forum.

The difference will be that it will be done with the Physics2D system… there’s tons of tutorials out for 2D triggers in there… get the trigger working, once it’s working, connect it to whatever UI you want to pop up. These are all extremely well-covered in tutorials.

This will all involve much more than simply code. There will be scene setup, possibly prefabs, etc. If you can’t get it from a tutorial, you certainly won’t get it from this tiny text box!

Remember the only two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.