In this video we will use Sprite Mask component to create X-Ray effect in 2D - make the player visible when behind other objects. We will also ensure that we can see the mask only when the player is actually behind an object instead of constantly.
Learn more about creating 2D games in Unity:
https://courses.sunnyvalleystudio.com/
Assets used:
https://itch.io/s/67807/super-retro-w...
How to sort sprites using Y axis blog:
https://www.sunnyvalleystudio.com/blo...
Patreon script link:
/ tutorial-x-ray-72866899
𝗛𝗮𝘃𝗲 𝗮𝗻𝘆 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀? 𝗝𝗼𝗶𝗻 𝘁𝗵𝗲 𝗱𝗶𝘀𝗰𝗼𝗿𝗱!
/ discord
𝗣𝗟𝗘𝗔𝗦𝗘 support the channel:
/ sunnyvalleystudio
00:00 Introduction
00:25 Project Setup Y sorting
00:50 How to use Sprite Mask in Unity
02:08 Visible Inside Mask
02:48 Visible Outside Mask
03:59 X-Ray using Sprite mask and custom script
08:50 Inspector setup
09:20 Testing X-Ray effect
#unity2d #gamedev #sunnyvalleystudio
Смотрите видео See the player behind objects in Unity 2D - Sprite Mask онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Sunny Valley Studio 04 Октябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7,628 раз и оно понравилось 189 людям.