You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesi贸n a prueba de IA

Antes: $249

Currency
$209
Suscr铆bete

Termina en:

0 D铆as
7 Hrs
35 Min
3 Seg

Mejora de la interfaz del juego

22/29
Resources

How to improve the game interface during gameplay in Unity?

Improving the user interface during gameplay is essential to provide a smooth and engaging game experience for users. In Unity, this task becomes more manageable with the proper creation and organization of UI elements. Here's a step-by-step guide on how to accomplish this improvement.

How to organize the interface?

To begin with, it is useful to have a reference image that shows how the interface should look like during gameplay. This reference can include new elements such as a point counter or a pause button. It is common practice to create a main container for the interface within Unity, which makes it easier to manage UI elements.

  1. Create a main container:

    • In the UI section, create a new component of type image and name it UI In Game.
    • Configure this component to have a full Stretch setting and set the distance to zero in all directions.
    • Disable the image to leave the container empty and easier to handle.
  2. Arrange the elements inside the container:

    • The first element, UI Points, should be a child of UI In Game.
    • Within this group, add a new image type element called Points Container and align it in the lower left corner.
    • Points Container does not need visible content, so remove the image component.

How to create a points counter?

A visually appealing points counter can make the player's progress more exciting.

  1. Adjust the counter text:

    • Within UI Points, modify the text component to display at least five zeros.
    • Use the Kenny Blocks font, disable auto size and assign a fixed size. Make sure the color is a bright shade of yellow.
  2. Add the star to the counter:

    • In Points Container, add a new image type object named star.
    • Select the previously imported star icon, enable preserve aspect to keep the proportions.
    • Adjust the color of the star to match the color of the counter text.
  3. Adjust details:

    • Duplicate the initial star, make it a child of the original, reduce its size and apply a darker color to give a differentiated visual effect.

How to set the pause button?

A pause button is crucial to allow players to take a break without losing progress in the game.

  1. Copy and alter an existing button:

    • Copy the button already created in UI Start Screen.
    • Paste it into UI In Game and adjust it so that its pivot is in the lower right corner (X=1, Y=0).
  2. Text removal and icon configuration:

    • Remove any text from the button and place the appropriate pause icon in the Image Source component.
    • Adjust the size and position so that it blends harmoniously into the game interface.

How to fix screen alignment problems?

Improper sizing or misalignment can be frustrating for the user. Here is how to solve such problems.

  1. Adjusting the size of level selection buttons:

    • If the buttons or lists are misaligned, edit the corresponding prefab from the prefabs folder.
    • Change the size or width of the container if necessary, but remember that changes made in play mode are not saved.
  2. Testing and applying settings:

    • When testing in play mode, take note of effective settings and apply them outside of play mode to ensure they persist.

This method not only improves the visual appearance, but provides an organized and efficient structure for the user. Once these improvements are applied, the game interface should be much better prepared for exciting and intuitive use.

Continuous improvement is essential in game development, so keep experimenting and adjusting as needed. Well done and keep learning!

Contributions 0

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?