Files
Continentis/Assets/OtherPlugins/Sprite Shaders Ultimate/Scripts/UnscaledTimeSSU.cs
SoulliesOfficial ad4948207e 推进度!
2025-11-25 21:49:03 -05:00

27 lines
601 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SpriteShadersUltimate
{
[AddComponentMenu("Sprite Shaders Ultimate/Utility/Unscaled Time SSU")]
[ExecuteAlways]
public class UnscaledTimeSSU : MonoBehaviour
{
public bool dontDestroyOnLoad;
void Awake()
{
if(dontDestroyOnLoad && Application.isPlaying)
{
DontDestroyOnLoad(gameObject);
}
}
void Update()
{
Shader.SetGlobalFloat("UnscaledTime", Time.unscaledTime);
}
}
}