Your next challenge is to use the onCollisionEnter function in the ButtonScript to send an event to the TreasureControllerScript to reset the game.
- Get an EntityRef for TreasureController in the ButtonScript
- Use the onCollisionEnter function to determine when you should send the event.
- Get the Entity associated with the EntityRef, and check that it is not null.
- Send an event to that Entity with a string that matches the function on the TreasureControllerScript, resetGame.