using UnityEngine; using UnityEngine.UI; using TMPro; using GhostSystem; public class VRDebugger : MonoBehaviour { public TMP_Text trackedObjects; public TMP_Text recording; public EyeTrackingCollisionPoints collisionPoints; private void OnEnable() { LocalPlayerReference.OnPlayerReady += GetTrackedObjects; GhostRecorderBatch.OnRecord += RecordingStart; GhostRecorderBatch.OnStopRecord += RecordingStop; } private void OnDisable() { LocalPlayerReference.OnPlayerReady -= GetTrackedObjects; GhostRecorderBatch.OnRecord -= RecordingStart; GhostRecorderBatch.OnStopRecord -= RecordingStop; } private void GetTrackedObjects() { GhostRecorderBatch ghostRecorder = FindFirstObjectByType(); foreach (var obj in ghostRecorder.TrackedObjects) { trackedObjects.text += "\n\r" + obj; } } private void RecordingStart() { recording.color = Color.white; recording.text = "Recording..."; } private void RecordingStop() { recording.color = Color.white; recording.text = "..."; } }