Fixed EyeTracking and other Issues. Redesigned Replay UI
This commit is contained in:
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using Oculus.Interaction;
|
||||
|
||||
namespace GhostSystem
|
||||
{
|
||||
@@ -13,6 +14,7 @@ namespace GhostSystem
|
||||
public string SceneId;
|
||||
public float SampleRate = 0.05f;
|
||||
public List<Transform> TrackedObjects;
|
||||
private int doorCount;
|
||||
|
||||
private float _timer;
|
||||
public bool _isRecording;
|
||||
@@ -39,10 +41,15 @@ namespace GhostSystem
|
||||
supabaseReady = true;
|
||||
}
|
||||
|
||||
private void HandleSceneIdReady(string id)
|
||||
private void HandleSceneIdReady(string id, List<GameObject> doors)
|
||||
{
|
||||
SceneId = id;
|
||||
sceneIdReady = true;
|
||||
foreach (GameObject door in doors)
|
||||
{
|
||||
TrackedObjects.Add(door.GetComponentInChildren<OneGrabRotateTransformer>().gameObject.transform);
|
||||
doorCount++;
|
||||
}
|
||||
}
|
||||
|
||||
private async void Update()
|
||||
@@ -107,6 +114,8 @@ namespace GhostSystem
|
||||
sceneIdReady = false;
|
||||
OnStopRecord?.Invoke();
|
||||
Debug.Log($"Stop recording: {SceneId}");
|
||||
TrackedObjects.RemoveRange( TrackedObjects.Count - doorCount, doorCount );
|
||||
doorCount = 0;
|
||||
}
|
||||
|
||||
private async Task TestInsert()
|
||||
|
||||
Reference in New Issue
Block a user