Skip to content

Commit fcf36d1

Browse files
committed
Added support for oculus quest.
1 parent e18bb12 commit fcf36d1

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

UnitySkipSplashScreen.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,25 @@ private static void Application_focusChanged(bool obj)
3535
}
3636

3737
#else
38-
private static void AsyncSkip() =>
38+
private static void AsyncSkip()
39+
{
40+
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE || UNITY_WSA
41+
#if UNITY_XR
42+
if (UnityEngine.XR.Management.XRGeneralSettings.Instance.Manager.isInitializationComplete)
43+
{
44+
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
45+
}
46+
else
47+
{
48+
UnityEngine.XR.Management.XRGeneralSettings.Instance.Manager.InitializeLoader();
49+
UnityEngine.XR.Management.XRGeneralSettings.Instance.Manager.StartSubsystems();
50+
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
51+
}
52+
#else
3953
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
4054
#endif
55+
#endif
56+
}
57+
#endif
4158
}
4259
#endif

0 commit comments

Comments
 (0)