Hello. I’m new to unity and also to c# coding. I just created a beginner project just like roll a ball. I just wanted to know the code that restarts the game with the player touches the side walls… Please help me out… Thank you.
If you’re not looking for any kind of physics reaction you can probably just use the OnTriggerEnter function. It’ll detect when you hit a trigger.
There’s an easy tutorial on it here:
link text