Converted everything to Meta XR All in One to make Eye-Tracking work again

This commit is contained in:
Thorbjoern
2025-06-01 04:30:55 +02:00
parent dd98bacb75
commit a5f152a23f
68 changed files with 71137 additions and 764 deletions
@@ -6,6 +6,7 @@ using Supabase.Gotrue;
using Supabase.Gotrue.Exceptions;
using Client = Supabase.Client;
using Cysharp.Threading.Tasks;
using TMPro;
namespace GhostSystem
{
@@ -25,6 +26,8 @@ namespace GhostSystem
public static event Action OnSuperbaseReady;
public TMP_Text textbox;
private void Start()
{
Initialize().Forget();
@@ -82,11 +85,13 @@ namespace GhostSystem
try
{
await supabase.InitializeAsync();
textbox.text += "\n\rSupabase initialized.";
Debug.Log("✅ Supabase initialized.");
}
catch (Exception ex)
{
Debug.LogError($"❌ Initialization failed: {ex}");
textbox.text += "\n\rInitialization failed";
}
await AuthenticateAsync(email, password);
@@ -98,6 +103,7 @@ namespace GhostSystem
try
{
await supabase.Auth.SignIn(email, password);
textbox.text += "\n\rSign-in successful";
Debug.Log("🔓 Sign-in successful");
}
catch (Exception authEx)
@@ -106,10 +112,12 @@ namespace GhostSystem
try
{
await supabase.Auth.SignUp(email, password);
textbox.text += "\n\rSign-up successful";
Debug.Log("🆕 Sign-up successful");
}
catch (Exception ex)
{
textbox.text += $"\n\rAuthentication failed: {ex}";
Debug.LogError($"❌ Authentication failed: {ex}");
}
}
@@ -127,9 +135,15 @@ namespace GhostSystem
await www.SendWebRequest();
if (www.result == UnityWebRequest.Result.Success)
{
textbox.text += $"\n\rSupabase health: {www.downloadHandler.text}";
Debug.Log($"✅ Supabase health: {www.downloadHandler.text}");
}
else
{
textbox.text += $"\n\rSupabase health check failed: {www.error}";
Debug.LogError($"❌ Supabase health check failed: {www.error}");
}
}
private async UniTask CheckGoogleConnectionAsync()
@@ -138,9 +152,15 @@ namespace GhostSystem
await www.SendWebRequest();
if (www.result == UnityWebRequest.Result.Success)
{
textbox.text += "\n\rGoogle request succeeded.";
Debug.Log("✅ Google request succeeded.");
}
else
{
textbox.text += $"\n\rGoogle connection failed: {www.error}";
Debug.LogError($"❌ Google connection failed: {www.error}");
}
}
}
}