1
This commit is contained in:
@@ -9,6 +9,7 @@ using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Debug = UnityEngine.Debug;
|
||||
// ReSharper disable Unity.LoadSceneWrongIndex
|
||||
|
||||
namespace BITKit.SceneManagement
|
||||
{
|
||||
@@ -48,8 +49,10 @@ namespace BITKit.SceneManagement
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
private static void Initialize()
|
||||
{
|
||||
if (AllowInitialize)
|
||||
if (AllowInitialize && SceneManager.sceneCount is not 0)
|
||||
{
|
||||
SceneManager.LoadSceneAsync(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
public static event Action<string> OnLoadScene;
|
||||
|
Reference in New Issue
Block a user