mirror of
https://github.com/OMGeeky/GameDevGameJamV2.git
synced 2025-12-27 23:07:51 +01:00
14 lines
304 B
C#
14 lines
304 B
C#
using UnityEngine;
|
|
|
|
public class DissolveSample : MonoBehaviour {
|
|
|
|
private Material material;
|
|
|
|
private void Start() {
|
|
material = GetComponent<Renderer>().material;
|
|
}
|
|
|
|
private void Update() {
|
|
material.SetFloat("_DissolveAmount", Mathf.Sin(Time.time) / 2 + 0.5f);
|
|
}
|
|
} |