Logo
Effects

Pixel Curtain

Reveal or hide a Graphic with a directional pixel transition

Overview

Pixel Curtain animates a Graphic as a field of cells that reveal or disappear along a direction. Use it for transitions, loading covers, and stylized UI reveals.

Preview

Usage

Add Pixel Curtain to the target Graphic.

Choose cell size, direction, and randomness.

Set the transition duration.

Call PlayIn(), PlayOut(), or PlayTransition() from a UI event.


Tips

  • Adapt To Rect Size controls cell sizing.
  • Fade Width changes the softness of the transition front.
  • A full transition can hold between the in/out phases using Hold Duration.
  • Cull Object controls visibility after hiding finishes.
  • The optional Button reference can connect the effect to an interaction state.

Public API

Use PixelCurtain in the Evo.UI namespace.

Fields

NameTypeDescription
cellSizefloatCell size for the effect.
directionVector2Direction of the transition.
randomnessfloatVariation between cells.
progressfloatCurrent shader transition amount.
transitionDurationfloatDuration of a transition.
autoFadeOutboolAutomatically follows the reveal with a hide.
holdDurationfloatDelay before automatic fade-out.

Methods

NameParametersDescription
PlayTransition()bool force = falsePlays the configured full transition.
PlayIn()bool force = falsePlays the reveal.
PlayOut()bool force = falsePlays the hide.
UpdateMaterialProperties()NoneUploads direct setting changes.

Events

NameTypeDescription
onFadeInCompleteUnityEventReveal completed.
onFadeOutCompleteUnityEventHide completed.

Example

PixelCurtainExample.cs
using UnityEngine;
using Evo.UI;

public class PixelCurtainExample : MonoBehaviour
{
    [SerializeField] private PixelCurtain target;

    private void Start()
    {
        target.transitionDuration = 0.6f;
        target.direction = Vector2.down;
        target.PlayIn();
    }
}

On this page