Crea una cuenta o inicia sesi贸n

隆Contin煤a aprendiendo sin ning煤n costo! 脷nete y comienza a potenciar tu carrera

Sprite Atlas: Los dulces


No solo podemos pedirle a Unity que divida los elementos de nuestros sprites de forma autom谩tica, tambi茅n nos permite dividirlos de forma manual. Eso es exactamente lo que vamos a hacer con los dulces de nuestra aplicaci贸n.

Aportes 6

Preguntas 3

Ordenar por:

驴Quieres ver m谩s aportes, preguntas y respuestas de la comunidad?

o inicia sesi贸n.

Arrastrar objetos de la escena al men煤 Project los convierte autom谩ticamente en prefabs, y el que queda en la escena puede ser modificado pero no altera el prefab amenos que en 鈥渙verrides鈥 le des 鈥渁pply all鈥


Esta clase estubo Genial!

Te reto a traducirme 馃榿 I dare you!
(y a corregirme llegado el caso)

<h5>Sprite Atlas Efficiency</h5>

Notice how we extract 40 鈥渋mages鈥 out of a single file uploading.
- This results on a better performance of the game, saving battery and resources for our player鈥檚 phone.


Selecting the boxes for our 鈥渃andy鈥.

- We let the **Sprite Editor** to do it's wizardry by automatically slicing the boxes spritesheet.  
- Then we drop a box and .. Ugh, it falls behind the background. 

Don鈥檛 worry

Order in Layer

  • Select the background OBJECT (Hierarchy) and set a lower number on it.
    We go deeper than -1 (say -10); as you may want to add some other object in between later.

Pixels per Unit

- The box we've dropped on the background is visible now 鈥aybe too much! 
  • We can select the container sprite on Assets and change it鈥檚 size on
    pixels per unit property: the bigger the number, the smaller the object

    • In this case 250 turned out to be around the optimal size.
  • ** Remember that this game is played with just your thumbs!**

    You may encounter this situations frequently while developing a game.
    The artists create the assets on their preferred formats; and then you need to work on these graphics for a technical adaptation.

    First Collider

    • The collider not for objects in between the game but **for the object and the player鈥檚 finger"
    • Inspector -> Add component -> Box Collider 2D

    First Script

    • Create new script inside de Scriptsfolder, we鈥檙e calling it Candy .
    • Now drag n鈥 drop the Candy script from the Assets to the box Object (Hierarchy || Inspector)

    First Prefab


    • rename the box to Candy,
    • set it鈥檚 position to the center (X 0 Y 0)
      the Candy object it鈥檚 ready to be drag 'n drop from the Hierarchy to the Prefabs folder.

Hola Personitas