Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Kreez

GUi button - Back to Menu (android)

Question

Someone please help me !

I'm a beginner so, I need a script example. If I touch the GUi button, then  load scene mainmenu.

Thank you for help !

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts


  • 0
Please login or register to see this quote.

If you do a 3d object and use that script, you need to add a collider.

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Yes, I added. Now there is no error message but... If i touch the Gui texture nothing happens

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this code.

So Just Assign This To The MainCamera, LevelToLoad You can write the name of the level you want to load in the inspector, GUI.Button works on android since i use it all the time for android, Hope this helps, Good luck.

Edited by Epic-Shot

Share this post


Link to post
Share on other sites
  • 0

Sooo. I added this script. If i touch the "Menu" Button then it is load the mainmenu and the current scene same time. The main camera in main menu gets wrong too. So it is buggy. :/ But thanks for help. Any idea ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...