Started adding multiplayer
This commit is contained in:
22
Assets/Scripts/Core/BootstrapLoader.cs
Normal file
22
Assets/Scripts/Core/BootstrapLoader.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PashaBibko.PenguinChase.Core
|
||||
{
|
||||
public static class BootstrapLoader
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void LoadBoostrapScene()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
// Stops loading in on the bootstrap scene
|
||||
if (SceneManager.GetActiveScene().name == "Bootstrap")
|
||||
{
|
||||
SceneManager.LoadScene("MainMenu", LoadSceneMode.Single);
|
||||
}
|
||||
#endif // UNITY_EDITOR
|
||||
|
||||
SceneManager.LoadScene("Bootstrap", LoadSceneMode.Additive);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user