Fixed EyeTracking and other Issues. Redesigned Replay UI
This commit is contained in:
@@ -100,9 +100,9 @@ MonoBehaviour:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeAdditionalLight: 4
|
||||
m_PrefilteringModeAdditionalLightShadows: 2
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilterXRKeywords: 0
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
@@ -122,10 +122,10 @@ MonoBehaviour:
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 0
|
||||
m_PrefilterSoftShadowsQualityMedium: 1
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterSoftShadows: 1
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_PrefilterUseLegacyLightmaps: 0
|
||||
|
||||
@@ -177,6 +177,11 @@ PrefabInstance:
|
||||
propertyPath: m_Layer
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8562895986849196437, guid: 8c93576c52c81874f9aaebf41b7c50e7,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Door
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8562895986849196437, guid: 8c93576c52c81874f9aaebf41b7c50e7,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+5625
-4824
File diff suppressed because it is too large
Load Diff
@@ -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()
|
||||
|
||||
@@ -8,6 +8,7 @@ using Postgrest;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using System.Globalization;
|
||||
using Oculus.Interaction;
|
||||
|
||||
namespace GhostSystem
|
||||
{
|
||||
@@ -46,6 +47,7 @@ namespace GhostSystem
|
||||
private bool supabaseReady = false;
|
||||
private bool sceneIdReady = false;
|
||||
private string loadedSceneId;
|
||||
private int doorCount;
|
||||
|
||||
private DateTime latestLoadedTimestamp;
|
||||
|
||||
@@ -74,10 +76,18 @@ namespace GhostSystem
|
||||
TryInitializeReplay();
|
||||
}
|
||||
|
||||
private void HandleSceneIdReady(string id)
|
||||
private void HandleSceneIdReady(string id, List<GameObject> doors)
|
||||
{
|
||||
sceneIdReady = true;
|
||||
loadedSceneId = id;
|
||||
foreach (GameObject door in doors)
|
||||
{
|
||||
TrackedObjectBinding trackedObjectBinding = new TrackedObjectBinding();
|
||||
trackedObjectBinding.objectId = "Door";
|
||||
trackedObjectBinding.targetObject = door.GetComponentInChildren<OneGrabRotateTransformer>().gameObject;
|
||||
TrackedObjects.Add(trackedObjectBinding);
|
||||
doorCount++;
|
||||
}
|
||||
TryInitializeReplay();
|
||||
}
|
||||
|
||||
@@ -292,6 +302,12 @@ namespace GhostSystem
|
||||
SetPlaybackTime(playbackSlider.value * totalDuration);
|
||||
}
|
||||
|
||||
public void RemoveDoors()
|
||||
{
|
||||
TrackedObjects.RemoveRange(TrackedObjects.Count - doorCount, doorCount);
|
||||
doorCount = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
using GhostSystem;
|
||||
using JetBrains.Annotations;
|
||||
using Oculus.Interaction;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -12,10 +15,12 @@ public class RoomManager : MonoBehaviour
|
||||
public List<GameObject> portals;
|
||||
public List<GameObject> enemies;
|
||||
|
||||
public static event Action<string> OnSceneIdReady; // um das Replay erst auszulösen, wenn die SceneId da ist, die nun über die RoomPrefs festgelegt wird.
|
||||
public static event Action<string, List<GameObject>> OnSceneIdReady; // um das Replay erst auszulösen, wenn die SceneId da ist, die nun über die RoomPrefs festgelegt wird.
|
||||
GhostRecorderBatch ghostRecorder;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
ghostRecorder = FindFirstObjectByType<GhostRecorderBatch>();
|
||||
if (myRoom == null)
|
||||
{
|
||||
Debug.LogError("RoomPrefs is not assigned in RoomManager.");
|
||||
@@ -25,7 +30,10 @@ public class RoomManager : MonoBehaviour
|
||||
//if (!myRoom.doors && myRoom.furniture && !myRoom.portals && !myRoom.enemies) return;
|
||||
if (myRoom.doors)
|
||||
{
|
||||
foreach (GameObject door in doors) door.SetActive(true);
|
||||
foreach (GameObject door in doors)
|
||||
{
|
||||
door.SetActive(true);
|
||||
}
|
||||
}
|
||||
if (!myRoom.furniture)
|
||||
{
|
||||
@@ -40,7 +48,7 @@ public class RoomManager : MonoBehaviour
|
||||
foreach (GameObject enemy in enemies) enemy.SetActive(true);
|
||||
}
|
||||
sceneId = myRoom.sceneId;
|
||||
OnSceneIdReady?.Invoke(sceneId);
|
||||
OnSceneIdReady?.Invoke(sceneId, doors);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,10 @@ EditorBuildSettings:
|
||||
- enabled: 0
|
||||
path: Assets/_Scenes/TestSceneMeta.unity
|
||||
guid: 91bfb95032feb044c81a3964f5553fec
|
||||
- enabled: 0
|
||||
- enabled: 1
|
||||
path: Assets/_Scenes/TestSceneMeta Offline.unity
|
||||
guid: b98b0de9fe670d2469cfbcd6e1d2d8f5
|
||||
- enabled: 1
|
||||
- enabled: 0
|
||||
path: Assets/_Scenes/TrainingObserverMeta.unity
|
||||
guid: 0572ea139ec37b84b88a8d21771f7f1a
|
||||
- enabled: 0
|
||||
|
||||
Reference in New Issue
Block a user