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

do scratch card effect with Image componenet??

Discussion in 'UGUI & TextMesh Pro' started by idurvesh, May 25, 2015.

  1. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    I would like to know is it possible to do scratch card like effect in new unity UI's Image component?
     
  2. bluescr

    bluescr

    Joined:
    Sep 7, 2014
    Posts:
    21
    The image component lets you assign a material with a custom shader. So lots of effects are possible if you know a bit about shaders. There's certainly lots of ways you could do an animaated reveal of an image using masking effects.

    If you want a user to actually 'scratch' (rub a touchscreen?) to reveal an image, you'll probably need to draw their finger movements into a texture (ideally a rendertexture, or maybe a low-res texture updated in a script), and use that texture in a shader to blend between two images?
     
  3. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Thanks for replay,

    I am no good at shaders but get it where to look for,

    any example you have??
     
  4. deiva

    deiva

    Joined:
    Jul 12, 2016
    Posts:
    16
    Hi friends, I want to create a scratch card effect in my game using Unity game engine. Kindly send tutorial or reference to guide me.
     

    Attached Files: