Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Creando UI en Unity | Interfaz y Sonidos de Unity
Unity para Principiantes
course content

Contenido del Curso

Unity para Principiantes

Unity para Principiantes

1. Introducción a Unity
2. Escribe tu Primer Script
3. Física de Unity
4. Interfaz y Sonidos de Unity
5. Pulido y Exportación de tu Juego

book
Creando UI en Unity

Choose the type of UI element you want to add (e.g., Button, Text, Image) from the "UI" menu.

This will add the selected UI element as a child of the Canvas in the scene.(it will create a canvas if it doesn't exist)

Use the Scene view to position and size the UI elements as desired.

You can click and drag UI elements to move them around and use the handles on the corners and edges to resize them.

With the UI element selected in the Hierarchy window, you can customize its properties in the Inspector window. Adjust properties such as text content, color, font size, image sprite, and others to customize the appearance of the UI element.

To make UI elements interactive, you can add event listeners and scripts. Select the UI element you want to add interactivity to. In the Inspector window, click on the "Add Component" button and add a script that handles user input (e.g., Button onClick events).

Next let's make something happen when we click on the button. First click on the plus button.

Next click on the player and drag and drop it there on the object filed.

Next, click on the arrow next to "No function":

Since we want the player to restart their position, we need to click on the playerMVT and select the RestartLevel() function.

This means when the player click on the button we will restart the level.

Which Unity component acts as a container for UI elements?

Which Unity component acts as a container for UI elements?

Selecciona la respuesta correcta

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 2
We're sorry to hear that something went wrong. What happened?
some-alt