I am trying to make a small game where you are in a maze and you have to find an object. I want to make it so you can touch or bump into the object and the game will go into the new scene that has just text saying congratulations…
So how do i get the game to end and enter ending scene when i touch the object
and how do i make a scene with just text
Thanks
For jumping into another scene when you touch the object, first you have to attach a Button component to that object and an script. In the script just add:
void OnClick() {
Application.LoadScene("NameOfTheScene");
}
And the game will load the scene called “NameOfTheScene” (or whatever) when you click or touch the object.
You have to create that scene with the same name and put inside whatever the Text you want (New → UI → Text).