using UnityEngine;
namespace Magisterka.BulletHell
{
///
/// Ensures the runtime bootstrapper exists even if the scene is empty.
///
public static class GameBootstrap
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
private static void EnsureInitializer()
{
if (Object.FindFirstObjectByType() != null)
{
return;
}
var go = new GameObject("GameInitializer");
go.AddComponent();
Object.DontDestroyOnLoad(go);
}
}
}