wip : akRoom Tansition in theater

This commit is contained in:
Hugo Le Bolloc'h
2026-05-25 20:22:12 +02:00
parent 0405f337cd
commit 746c6ce13c
80 changed files with 840 additions and 141 deletions
@@ -32,34 +32,30 @@ public class Audio_AudioManager : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
SetWwiseMusicState(WwiseMusicState.Sane); //Need to switch if we have a menu music.
// Guard against the duplicate running Start() before it's destroyed
if (Instance != this) return;
SetWwiseMusicState(WwiseMusicState.Sane);
PlayMusic.Post(gameObject);
}
void Initialize()
{
//Singleton Logic
if (Instance == null)
{
Instance = this;
DontDestroyOnLoad(this);
DontDestroyOnLoad(gameObject);
isInitialized = true;
}
else
{
Debug.LogWarning("AudioManager already exist! Destroying new instance.");
Destroy(this);
Debug.LogWarning("AudioManager already exists! Destroying new instance.");
Destroy(gameObject); // Destroy the whole GameObject, not just the component
}
if (isInitialized)
{
isInitialized = true;
}
}
public void SetWwiseMusicState(WwiseMusicState MusicState)
{