breakpoint
before update unity version
This commit is contained in:
@@ -10,8 +10,41 @@ using Cinemachine.Utility;
|
||||
using UnityEngine.InputSystem;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
public class SkipSplash
|
||||
{
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
|
||||
private static void BeforeSplashScreen()
|
||||
{
|
||||
#if UNITY_WEBGL
|
||||
Application.focusChanged += Application_focusChanged;
|
||||
#else
|
||||
System.Threading.Tasks.Task.Run(AsyncSkip);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_WEBGL
|
||||
private static void Application_focusChanged(bool obj)
|
||||
{
|
||||
Application.focusChanged -= Application_focusChanged;
|
||||
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
|
||||
}
|
||||
|
||||
#else
|
||||
private static void AsyncSkip()
|
||||
{
|
||||
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
namespace BITKit
|
||||
{
|
||||
|
||||
public class MouseNotOverGameViewException : System.Exception
|
||||
{
|
||||
public MouseNotOverGameViewException()
|
||||
@@ -46,6 +79,17 @@ namespace BITKit
|
||||
}
|
||||
public static bool IsPlaying { get;private set; }
|
||||
public static bool IsPointerOverUI { get; set; }
|
||||
|
||||
public static bool IsEditor
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static ValidHandle AllowCursor = new();
|
||||
public static ValidHandle AllowTouchSupport = new();
|
||||
public static GameObject GameObject;
|
||||
@@ -119,8 +163,9 @@ namespace BITKit
|
||||
}
|
||||
}
|
||||
[BITCommand]
|
||||
public static void Exit()
|
||||
public static async void Exit()
|
||||
{
|
||||
await BITApp.SwitchToMainThread();
|
||||
BITApp.Stop();
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
|
Reference in New Issue
Block a user