Untitled
unknown
plain_text
a year ago
506 B
7
Indexable
using UnityEngine;
public class ImageTransitionController : MonoBehaviour
{
public Material transitionMaterial;
public float transitionSpeed = 1f;
private float blendValue = 0f;
void Update()
{
// Update the blend value over time
blendValue += Time.deltaTime * transitionSpeed;
if (blendValue > 4f) blendValue = 0f; // Loop back to the start
// Apply the blend value to the material
transitionMaterial.SetFloat("_Blend", blendValue);
}
}
Editor is loading...
Leave a Comment