摄像机区域的架构改动
This commit is contained in:
24
Assets/Sprite Shaders Ultimate/Scripts/UnscaledTimeSSU.cs
Normal file
24
Assets/Sprite Shaders Ultimate/Scripts/UnscaledTimeSSU.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SpriteShadersUltimate
|
||||
{
|
||||
public class UnscaledTimeSSU : MonoBehaviour
|
||||
{
|
||||
public bool dontDestroyOnLoad;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if(dontDestroyOnLoad)
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
Shader.SetGlobalFloat("UnscaledTime", Time.unscaledTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user