1. Introduction to Unity by Unknown

1. Introduction to Unity by Unknown

Author:Unknown
Language: eng
Format: epub
Published: 2019-09-16T16:00:00+00:00


Buttons

Let's add some UI. The commun buttons to have in a menu are: Start Game, Load Game, Options and Quit. Create a Canvas and don't forget to change the UI Scale Mode to Scale with Screen Size. To create a button, right-click on the Canvas, UI -> Button. Unity's default button has a couple components. The image component is the rectangle and the button component has some basic animations and an onClick function.

In the Hierarchy Panel, under Button, there's a text component. Delete it and replace it by a TextMesh Pro text.

Change the Text to New Game, the Font Asset to Kayto Hand, check Bold, the font size to 60 and the alignment to Left. Then, click on the Button game object, on the Button component, change the Target Graphic to the New game Text. That way, the animation will apply to the text. Then, copy paste the same button and change the name for: Load Game, Options and Quit.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.