Hallucination system

This commit is contained in:
Ferlat Thibaud
2026-03-16 17:06:47 +01:00
parent 10faf74405
commit 0d968f75ab
44 changed files with 2860 additions and 909 deletions
@@ -0,0 +1,25 @@
using UnityEngine;
namespace Unheimlich.Core.Utils
{
/// <summary>
/// Resets third-party static state that doesn't handle Domain Reload being disabled.
/// Runs automatically at the start of every Play Mode session before the scene loads.
/// </summary>
internal static class GameSessionResetter
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
private static void OnSessionStart()
{
ResetLeanTween();
}
private static void ResetLeanTween()
{
// LeanTween holds a static tween array that persists when Domain Reload is disabled.
// Stale tween IDs from the previous session cause callbacks to fire on wrong objects,
// which breaks animations like organic shake on floating words.
LeanTween.reset();
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 34edfe05577b2a24892a90d9901cef39