Files

22 lines
447 B
C#
Raw Permalink Normal View History

2026-02-21 16:58:22 -08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AllIn1SpriteShader
{
[ExecuteInEditMode]
public class SetGlobalTime : MonoBehaviour
{
int globalTime;
void Start()
{
globalTime = Shader.PropertyToID("globalUnscaledTime");
}
void Update()
{
Shader.SetGlobalFloat(globalTime, Time.unscaledTime / 20f);
}
}
}