See the player behind objects in Unity 2D - Sprite Mask

Published: 04 October 2022
on channel: Sunny Valley Studio
7,628
189

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


Watch video See the player behind objects in Unity 2D - Sprite Mask online without registration, duration hours minute second in high quality. This video was added by user Sunny Valley Studio 04 October 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,628 once and liked it 189 people.