Logo
Effects

Ripple

Draw expanding interaction feedback inside a Graphic

Overview

Ripple draws an expanding highlight inside an Image, RawImage, or Procedural Shape. V2 renders it through the target Graphic instead of spawning the old ripple prefab hierarchy.

Preview

Usage

Add Ripple to a UI object, or enable Ripple on its Interactive component.

Assign the target Graphic. If none is assigned, the standalone component looks on its own GameObject.

Set color, coverage, softness, and timing.

Choose automatic pointer/submit triggering or call Create() yourself.


Customization

  • Coverage is relative to the farthest corner at the end of the coverage duration.
  • Growth continues during fade-out.
  • Centered starts ripples at the center regardless of the pointer.
  • Ignore Graphic Alpha keeps the ripple at its own opacity when the graphic is translucent or fully transparent, such as a ghost button. The sprite or Procedural Shape outline still clips it, and Canvas Groups and masks still apply.

Limitations

The renderer supports up to eight concurrent ripples.


Public API

Use Ripple in the Evo.UI namespace.

Fields

NameTypeDescription
rippleSettingsSettings object, including enabled and targetGraphic.
createOnClickboolCreates a ripple on left pointer down.
createOnSubmitboolCreates a ripple on submit.
MaximumRipplesintMaximum concurrent ripples: 8.

Methods

NameParametersDescription
Create()PointerEventData eventData = nullEmits a ripple; no pointer event creates it at the center.

Settings

Ripple.Settings exposes enabled, targetGraphic, color, ignoreGraphicAlpha, coverage, softness, centered, duration, and fadeOutDuration. Its Clear() method removes the effect state.

Example

RippleExample.cs
using UnityEngine;
using Evo.UI;

public class RippleExample : MonoBehaviour
{
    [SerializeField] private Ripple target;

    private void Start()
    {
        target.ripple.enabled = true;
        target.ripple.color = new Color(1f, 1f, 1f, 0.2f);
        target.ripple.duration = 0.2f;
        target.ripple.fadeOutDuration = 0.4f;
        target.Create();
    }
}

On this page