25 lines
630 B
C#
25 lines
630 B
C#
using UnityEngine;
|
|
|
|
namespace VolumetricFogAndMist
|
|
{
|
|
public class DemoBoxedArea : MonoBehaviour
|
|
{
|
|
private void Update()
|
|
{
|
|
VolumetricFog instance = VolumetricFog.instance;
|
|
if (Input.GetKeyDown(KeyCode.T))
|
|
{
|
|
instance.enabled = !instance.enabled;
|
|
}
|
|
}
|
|
|
|
private void OnGUI()
|
|
{
|
|
Rect position = new Rect(10f, 10f, Screen.width - 20, 30f);
|
|
GUI.Label(position, "Move around with WASD or cursor keys, space to jump, T to toggle fog on/off.");
|
|
position = new Rect(10f, 30f, Screen.width - 20, 30f);
|
|
GUI.Label(position, "Current fog preset: " + VolumetricFog.instance.GetCurrentPresetName());
|
|
}
|
|
}
|
|
}
|