CoronaRun/Assets/Scenes/scripts/BackgroundMusic.cs
2025-01-19 22:16:28 +05:30

31 lines
574 B
C#

using UnityEngine;
public class BackgroundMusic : MonoBehaviour
{
private static BackgroundMusic backgroundMusic;
void Awake()
{
if(backgroundMusic == null)
{
backgroundMusic = this;
DontDestroyOnLoad(backgroundMusic);
}
else
{
Destroy(gameObject);
}
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}