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
@@ -0,0 +1,40 @@
using GhostSystem;
using NUnit.Framework;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
public class LocalPlayerReference : NetworkBehaviour
{
public static LocalPlayerReference Instance { get; private set; }
public List<Transform> myObjects;
public override void OnNetworkSpawn()
{
if (IsOwner)
{
Instance = this;
Debug.Log("[LocalPlayerReference] Lokaler Spieler registriert.");
// Optional: Liste von Transforms vorbereiten
GhostRecorderBatch ghostRecorder = FindFirstObjectByType<GhostRecorderBatch>();
if (ghostRecorder != null)
{
foreach (Transform obj in myObjects)
{
ghostRecorder.TrackedObjects.Add(obj);
}
}
}
}
private void OnDestroy()
{
if (IsOwner && Instance == this)
{
Instance = null;
}
}
}