1 #region Copyright Notice & License Information
35 [AddComponentMenu (
"Hydrogen/Singletons/Audio Stack")]
51 static readonly System.Object _syncRoot =
new System.Object ();
65 if (_staticInstance == null) {
70 if (_staticInstance == null) {
71 var go = GameObject.Find (Hydrogen.Components.DefaultSingletonName) ??
72 new GameObject (Hydrogen.Components.DefaultSingletonName);
74 go.AddComponent<hAudioStack> ();
75 _staticInstance = go.GetComponent<hAudioStack> ();
79 return _staticInstance;
88 return _staticInstance != null;
94 protected override void Awake ()
101 DontDestroyOnLoad (gameObject);
static hAudioStack Instance
Gets the Audio Stack instance, creating one if none is found.
override void Awake()
Unity's Awake Event
static bool Exists()
Does an Audio Stack already exist?
A drop in implementation of the Hydrogen.Core.AudioStack. This simply makes the class an accessible s...
bool Persistent
Should this Audio Stack survive scene switches?