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:

2 Días
11 Hrs
52 Min
19 Seg

Máscaras y efectos

7/29
Resources

How to add effects to images in Unity?

Unity offers easy-to-use tools to enrich the images of our interfaces by adding depth and dynamism. Two of the most used effects are shadows and outlines, which can be implemented directly from the Unity editor.

How to create shadows on your images?

To add a shadow to an image in Unity, start by selecting the desired image. Then, add a new component looking for the "Shadow" effect. This effect allows you to add an external shadow to the image:

  • Organization and layout: When selecting the image, it is useful to keep your hierarchy well organized. Rename your elements, for example, to "Blue" for a blue image.
  • Shadow settings: You can control the distance of the shadow, for example, by assigning values such as 5 and -5, or increasing to 20 and -20 for a more pronounced effect.
  • Shadow color: Customize the color of the effect according to the stylization you want for your interface.

These basic but effective shadows allow you to customize and visually adjust your projects.

How to apply the Outline effect for outlines?

The Outline effect adds a line around the selected image, and is easy to apply:

  1. Select your image and add the "Outline" component from the Unity engine.
  2. Set the "Effect Distance" to values like 20 and 20 to control the thickness of the outline.
  3. Modify the color and opacity: A red outline is visible, but for a more dynamic effect, use a yellow color to highlight the selection of elements or an "On Hover" mouse effect.

These two effects, integrated in Unity, offer not only creative but also functional options by making user interactions visible in the interface.

How to use masks in Unity?

Masks are a powerful tool for delimiting the visibility of elements. If you have ever used Photoshop, you will be familiar with the concept of covering a top layer with a bottom layer, showing only what is inside the top layer.

How to mask elements in Unity?

To mask an element, follow these steps:

  1. Create a hierarchy: Move the element (for example, a blue button) inside an object that will act as a mask (for example, a white button) to establish a parent-child relationship in your hierarchy.
  2. Add the mask component: To the top white element, add the "Mask" component. This will make the child elements visible only within the region defined by the mask.

This technique is especially useful in complex interfaces, such as an inventory panel, where only the elements within the panel should be visible.

What considerations should I keep in mind when working with masks?

  • When applying masks, avoid components that cause pixelation, such as shadow effects on the masking object. Consider disabling them to maintain visual quality.
  • Experiment with merging effects and masks to get impressive and unique results in your interfaces.

The integration of effects such as shadows, outlines and masks offers versatile tools to enhance the visual customization of your Unity projects. Continue exploring and experimenting with these features to make your interfaces more attractive and functional!

Contributions 0

Questions 0

Sort by:

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