Add utils + refacto

This commit is contained in:
2026-01-30 17:39:26 +01:00
parent 9ff17b5305
commit 23d3cb5d2c
29 changed files with 675 additions and 461 deletions
@@ -1,13 +1,13 @@
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using Unheimlich.Core;
namespace Unheimlich.UI
{
[RequireComponent(typeof(Camera))]
public class DialogueBlurEffectURP : MonoBehaviour
public class DialogueBlurEffectURP : Singleton<DialogueBlurEffectURP>
{
public static DialogueBlurEffectURP Instance { get; private set; }
[Header("Volume Settings")]
[SerializeField] private Volume _globalVolume;
@@ -43,15 +43,8 @@ namespace Unheimlich.UI
private Camera _baseCam;
private Camera _dialogueCam;
void Awake()
protected override void OnAwake()
{
if (Instance != null && Instance != this)
{
Destroy(this);
return;
}
Instance = this;
_baseCam = GetComponent<Camera>();
if (_fadeCurve == null || _fadeCurve.keys.Length == 0)