docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Fading Image objects

    1. Quick Start
    2. Gap Extrapolation
    3. FaderPlayableAsset

    Quick Start

    From an empty scene, do the following:

    1. Create an empty GameObject and add a Director component to it

    2. Copy the sequential images in a folder inside the Unity project, preferably under StreamingAssets

      Copying to a folder under StreamingAssets will save us from the process to import those images in Unity, which may take a long time if there are a lot of images

    3. Open the Timeline window

    4. Add a FaderTrack in the Timeline Window

      AddFaderTrack

    5. Right click on the timeline window and click Add Fader Playable Asset

      AddFaderPlayableAsset

    6. Create an Image object by clicking the menu: GameObject -> UI -> Image

    7. Drag and drop the Image object to the object property of the FaderTrack

    The Image object will be faded in/out as we play the Timeline or drag the time slider of the Timeline window.

    Gap Extrapolation

    FaderPlayableAssetExtrapolation

    The behaviour of a gap before or after a FaderPlayableAsset clip can be set in a similar way to setting gap extrapolation for Animation clips using one of the following options:

    1. None (default): hide the bound object by deactivating its Renderer component.
    2. Hold: hold and show the first/last state of the fading in the gap.
    3. Loop: loop the entire fading with the same clip duration.
    4. Ping Pong: loop the entire fading backwards, then forwards, and so forth, with the same clip duration.
    5. Continue: same as Hold

    By default, FaderPlayableAsset sets both Pre-Extrapolate and Post-Extrapolate properties to None.

    FaderPlayableAsset

    FaderPlayableAsset is a type of PlayableAsset which is used for fading Image component in Unity Timeline.
    We can view or modify the following properties through the inspector.

    FaderPlayableAsset

    • Color
      The color to be applied to the Image component attached to the track.
    • Fade Type
      • FadeIn : from invisible (alpha=0) to visible (alpha=1)
      • FadeOut: from visible (alpha=1) to invisible (alpha=0)
    In This Article
    • Quick Start
    • Gap Extrapolation
    • FaderPlayableAsset
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)