top of page

Unity Menu Creation

Writer's picture: Deano SmithDeano Smith

Updated: May 26, 2021

Before anything, we went online to find two different backgrounds to use. These are the ones I have chosen:

I dragged them both into assets, with the first one I dragged it into the hierarchy, and then saved the scene (as Sc01) and opened a new file. where I do the same with the other background (as Sc02). I then go to GameObject and create a canvas, then using GameObject again I get a button, both from the UI section.

I then add a component to the button called LoadupScene, and it creates a visual studio program in the assets folder that I made to look like this.

I knew when I had done it correctly because on the LoadupScene component there was a section called scene and I had entered the name of what I saved the other background as, which is Sc02

Then on the actual button component I clicked the plus to reveal a section where I can drag in the button from the hierarchy into On Click () then from the arrow selection part I pickd LoadupScene, then loadScene() and it should work after that.

In my own time I managed to add another button on the other scene so that I can switch between the two easily.

Clicking the Button will take you to the other screen.

1 view0 comments

Recent Posts

See All

Comentarios


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by Dean Smith NEXTGEN Year 2. Proudly created with Wix.com

bottom of page