Logo
Effects

Warning Stripe

Display a scrolling stripe pattern through an Image

Overview

Warning Stripe is an Image with a procedural scrolling stripe material. Use it for warning areas, loading accents, and decorative separators.

Preview

Usage

Add Warning Stripe to a UI rectangle.

Assign an optional sprite and set the Image color.

Adjust line width, spacing, angle, softness, and scroll speed in the Inspector.


Notes

This component derives directly from Image and does not need a separate Image component.


Public API

Use WarningStripe in the Evo.UI namespace. Its properties update the graphic automatically.

Properties

NameTypeDescription
LineWidthfloatStripe width, from 0.01 to 0.5. One unit is 100 canvas units.
LineSpacingfloatSpace between stripes, from 0.01 to 1. One unit is 100 canvas units.
LineAnglefloatStripe angle in degrees, from -180 to 180.
EdgeSoftnessfloatStripe edge softness in screen pixels, from 0.1 to 4.
ScrollSpeedfloatScroll speed, from -5 to 5. Negative values reverse the direction.

Inherited properties

Use Image/Graphic properties such as sprite, color, raycastTarget, and material.

Example

WarningStripeExample.cs
using UnityEngine;
using Evo.UI;

public class WarningStripeExample : MonoBehaviour
{
    [SerializeField] private WarningStripe target;

    private void Start()
    {
        target.color = new Color(1f, 0.75f, 0.15f, 1f);
        target.LineWidth = 0.2f;
        target.LineSpacing = 0.2f;
        target.LineAngle = 45f;
        target.ScrollSpeed = 0.5f;
        target.raycastTarget = false;
    }
}

On this page