Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

rendering a specifc part of sprite to creat xray effects.

Discussion in 'Scripting' started by sharpg, Jun 5, 2015.

  1. sharpg

    sharpg

    Joined:
    Mar 10, 2015
    Posts:
    150
    Hi,I am working on a small 2d game.I have two sprite one is my character and other sprite is a skeleton.my character is on upper layer and skeleton is on lower layer.I have an object which is my x-ray lens.I want if i bring my x-ray lens on my character then the specific part of skeleton should rendered to create x-ray effects.So where i bring my x-ray lens in scene only that part of skeleton souled rendered.Please Help.
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,833
    The "Mask" component will allow you to make a component that only gets rendered within the bounds specified by another image.
     
    sharpg likes this.
  3. sharpg

    sharpg

    Joined:
    Mar 10, 2015
    Posts:
    150
    Can you please tell me any good tutorial how can i implement it?
     
  4. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,833
    I believe it was demonstrated briefly in the scroll rect tutorial...
     
  5. sharpg

    sharpg

    Joined:
    Mar 10, 2015
    Posts:
    150
    Sir it is for UI.I want to implement in game play.