- Create a Canvas, change its color.
- Create an empty GameObject (rename to SandClock).
- In SandClock add an Image (rename to Holder). Encrease SandClock's size.
- Check SandClock sprite, change Sprite Mode to "multiple", slice this sprite.
- Set "SandClock_0" sprite as Holder's source image. Change Holder's size and color.
- Duplicate the Holder (rename to Glass), place it before Holder.
- Set "SandClock_1" sprite as Glass's source image. Change its color and size.
- Inside the SandClock create a new empty GameObject (rename it to Fill).
- In Fill create an Image (rename to TopFillImage).
- Set "SandClock_2" sprite as TopFillImage's source image, rotate it (180 degrees), change its size and color.
- Duplicate the TopFillImage (rename to BottomFillImage), rotate it (0 degrees).
- In the SandClock add Text field (place it to the upper part of the Glass).
- In TopFillImage and BottomFillImage set Image Type to "Filled", set Fill Method to "Vertical".
- In TopFillImage set Fill Origin to "Top".
- Create a new C# script, add logic.
- Add script to SandClock.
- Create a new Material (SandDots). Set Shader (Mobile -> Particles -> Alpha Blended). Set Texture (Sand).
- In Sand sprite set Wrape Mode to "Repeat", Pixel per unit = 450.
- In Fill duplicate the BottomFillImage (rename to SandDots). Set its Image Type to "Tiled". Set Source Image (Sand). Set Material (SandDots). Change its size. Place it before TopFillImage.
- Duplicate BottomFillImage (rename to BottomMask), replace it before SandDots. Add a Mask component. Set a color same as a glass color. Set Image Type to "Simple".
- Inside the BottomMask create an Image (SandPyramidImage). Set Source Image (SandPyramid). Change its color an size.
-
Notifications
You must be signed in to change notification settings - Fork 0
Normandy72/Unity-SandClock
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
How to create a sand clock in Unity. Based on Hamza Herbou 's tutorial.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published