initial commit

This commit is contained in:
Jo 2025-01-07 02:06:59 +01:00
parent 6715289efe
commit 788c3389af
37645 changed files with 2526849 additions and 80 deletions

View file

@ -0,0 +1,38 @@
#if UNITY_STANDALONE_WIN && !UNITY_EDITOR
#define OCULUSPLUGIN_WINDOWS_PLATFORM_ONLY
#endif
using UnityEngine;
namespace Unity.XR.Oculus
{
internal static class RegisterUpdateCallback
{
internal static void Initialize()
{
Application.onBeforeRender += Update;
}
internal static void Deinitialize()
{
Application.onBeforeRender -= Update;
}
private static void Update()
{
//Detect if input focus lost or acquired.
InputFocus.Update();
// Update our session state
OculusSession.Update();
#if OCULUSPLUGIN_WINDOWS_PLATFORM_ONLY
//Detect if App is closed from Oculus dash menu and close Windows based App as well.
if (NativeMethods.GetAppShouldQuit())
{
Application.Quit();
}
#endif
}
}
}