Import AllIn1SpriteShader
This commit is contained in:
parent
73557e3bbe
commit
4d817ea88a
87 changed files with 8553 additions and 0 deletions
22
Assets/AllIn1SpriteShader/Scripts/SetGlobalTime.cs
Normal file
22
Assets/AllIn1SpriteShader/Scripts/SetGlobalTime.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue