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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Bug Trying to make a timeline where an image fades in and fades out. (Rest in desc)

Discussion in 'Timeline' started by cs5947, Dec 7, 2022.

  1. cs5947

    cs5947

    Joined:
    Feb 6, 2021
    Posts:
    6
    Trying to make a timeline where an image fades in and fades out. It works fine but when I play the game it fades in, but refuses to fade out.
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    How are you doing the fade? What property are you animating etc? From your video, I could not see the fade in/out at all in Play mode (it was just visible all the time). Here is a little video I did a while back - lots of stuff you don't need, but it shows how I animated the background in/out. (I am not an expert, but this worked for me.)
     
  3. cs5947

    cs5947

    Joined:
    Feb 6, 2021
    Posts:
    6
    I did the fade by keyframing the opacity of the image via the colour. When I play the game, the small alpha bar at the bottom of the colour does go down but the image's opacity onscreen stays the same.
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    At around 5:30 in the video above I animated the alpha value of the color property of the RawImage component that I used. Which color property did you animate? Materials sometimes cause caching problems I think which is why I am trying to be precise exactly which property of which component you are animating.