Currently dealing with a strange issue with a custom function I've registered.
Basically, it grabs a reference to the instanced Sound Manager Singleton in order to load & play a sound from the Resourced folder.
I've tested the script & confirmed that it works - but ONLY on the first scene that the DialogueManager exists in.
Code: Select all
public void PlaySFX(string sfxName)
{
AudioClip sound = Resources.Load<AudioClip>($"Sounds/{sfxName}");
AudioManager.Instance.PlaySound(sound);
Debug.Log("Playing sound via lua script");
}
There's also the issue that triggering this script efect doesn't show the Debug.Log at all, so it's in this strange realm of encapsulation I can't see into to diagnose the issue.
If you could give me some direction, that would be appreciated!