Changed Awake/Start to OnAwake

This commit is contained in:
journaliciouz
2025-11-03 14:44:15 +01:00
parent 475f54b704
commit ae840a4b2f

View File

@@ -19,7 +19,7 @@ public class AppleAudioSource : MonoBehaviour
public int sourcePriority; public int sourcePriority;
// Start is called once before the first execution of Update after the MonoBehaviour is created // Start is called once before the first execution of Update after the MonoBehaviour is created
void Start() void OnEnable()
{ {
audioSource = GetComponent<AudioSource>(); audioSource = GetComponent<AudioSource>();
AudioManager.Instance.RegisterNewAudioSource(this); AudioManager.Instance.RegisterNewAudioSource(this);
@@ -29,10 +29,6 @@ public class AppleAudioSource : MonoBehaviour
} }
private void Awake()
{
Start();
}
public void InitializeAudioSource() public void InitializeAudioSource()
{ {