Fixed EyeTracking and other Issues. Redesigned Replay UI
This commit is contained in:
@@ -100,9 +100,9 @@ MonoBehaviour:
|
|||||||
m_Keys: []
|
m_Keys: []
|
||||||
m_Values:
|
m_Values:
|
||||||
m_PrefilteringModeMainLightShadows: 3
|
m_PrefilteringModeMainLightShadows: 3
|
||||||
m_PrefilteringModeAdditionalLight: 3
|
m_PrefilteringModeAdditionalLight: 4
|
||||||
m_PrefilteringModeAdditionalLightShadows: 2
|
m_PrefilteringModeAdditionalLightShadows: 2
|
||||||
m_PrefilterXRKeywords: 1
|
m_PrefilterXRKeywords: 0
|
||||||
m_PrefilteringModeForwardPlus: 0
|
m_PrefilteringModeForwardPlus: 0
|
||||||
m_PrefilteringModeDeferredRendering: 0
|
m_PrefilteringModeDeferredRendering: 0
|
||||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||||
@@ -122,10 +122,10 @@ MonoBehaviour:
|
|||||||
m_PrefilterDBufferMRT1: 1
|
m_PrefilterDBufferMRT1: 1
|
||||||
m_PrefilterDBufferMRT2: 1
|
m_PrefilterDBufferMRT2: 1
|
||||||
m_PrefilterDBufferMRT3: 1
|
m_PrefilterDBufferMRT3: 1
|
||||||
m_PrefilterSoftShadowsQualityLow: 1
|
m_PrefilterSoftShadowsQualityLow: 0
|
||||||
m_PrefilterSoftShadowsQualityMedium: 1
|
m_PrefilterSoftShadowsQualityMedium: 1
|
||||||
m_PrefilterSoftShadowsQualityHigh: 1
|
m_PrefilterSoftShadowsQualityHigh: 1
|
||||||
m_PrefilterSoftShadows: 0
|
m_PrefilterSoftShadows: 1
|
||||||
m_PrefilterScreenCoord: 1
|
m_PrefilterScreenCoord: 1
|
||||||
m_PrefilterNativeRenderPass: 1
|
m_PrefilterNativeRenderPass: 1
|
||||||
m_PrefilterUseLegacyLightmaps: 0
|
m_PrefilterUseLegacyLightmaps: 0
|
||||||
|
|||||||
@@ -177,6 +177,11 @@ PrefabInstance:
|
|||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8562895986849196437, guid: 8c93576c52c81874f9aaebf41b7c50e7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Door
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8562895986849196437, guid: 8c93576c52c81874f9aaebf41b7c50e7,
|
- target: {fileID: 8562895986849196437, guid: 8c93576c52c81874f9aaebf41b7c50e7,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Layer
|
propertyPath: m_Layer
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+5623
-4822
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,7 @@ using UnityEngine;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using Oculus.Interaction;
|
||||||
|
|
||||||
namespace GhostSystem
|
namespace GhostSystem
|
||||||
{
|
{
|
||||||
@@ -13,6 +14,7 @@ namespace GhostSystem
|
|||||||
public string SceneId;
|
public string SceneId;
|
||||||
public float SampleRate = 0.05f;
|
public float SampleRate = 0.05f;
|
||||||
public List<Transform> TrackedObjects;
|
public List<Transform> TrackedObjects;
|
||||||
|
private int doorCount;
|
||||||
|
|
||||||
private float _timer;
|
private float _timer;
|
||||||
public bool _isRecording;
|
public bool _isRecording;
|
||||||
@@ -39,10 +41,15 @@ namespace GhostSystem
|
|||||||
supabaseReady = true;
|
supabaseReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleSceneIdReady(string id)
|
private void HandleSceneIdReady(string id, List<GameObject> doors)
|
||||||
{
|
{
|
||||||
SceneId = id;
|
SceneId = id;
|
||||||
sceneIdReady = true;
|
sceneIdReady = true;
|
||||||
|
foreach (GameObject door in doors)
|
||||||
|
{
|
||||||
|
TrackedObjects.Add(door.GetComponentInChildren<OneGrabRotateTransformer>().gameObject.transform);
|
||||||
|
doorCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Update()
|
private async void Update()
|
||||||
@@ -107,6 +114,8 @@ namespace GhostSystem
|
|||||||
sceneIdReady = false;
|
sceneIdReady = false;
|
||||||
OnStopRecord?.Invoke();
|
OnStopRecord?.Invoke();
|
||||||
Debug.Log($"Stop recording: {SceneId}");
|
Debug.Log($"Stop recording: {SceneId}");
|
||||||
|
TrackedObjects.RemoveRange( TrackedObjects.Count - doorCount, doorCount );
|
||||||
|
doorCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TestInsert()
|
private async Task TestInsert()
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Postgrest;
|
|||||||
using Cysharp.Threading.Tasks;
|
using Cysharp.Threading.Tasks;
|
||||||
using UnityEngine.Rendering.Universal;
|
using UnityEngine.Rendering.Universal;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using Oculus.Interaction;
|
||||||
|
|
||||||
namespace GhostSystem
|
namespace GhostSystem
|
||||||
{
|
{
|
||||||
@@ -46,6 +47,7 @@ namespace GhostSystem
|
|||||||
private bool supabaseReady = false;
|
private bool supabaseReady = false;
|
||||||
private bool sceneIdReady = false;
|
private bool sceneIdReady = false;
|
||||||
private string loadedSceneId;
|
private string loadedSceneId;
|
||||||
|
private int doorCount;
|
||||||
|
|
||||||
private DateTime latestLoadedTimestamp;
|
private DateTime latestLoadedTimestamp;
|
||||||
|
|
||||||
@@ -74,10 +76,18 @@ namespace GhostSystem
|
|||||||
TryInitializeReplay();
|
TryInitializeReplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleSceneIdReady(string id)
|
private void HandleSceneIdReady(string id, List<GameObject> doors)
|
||||||
{
|
{
|
||||||
sceneIdReady = true;
|
sceneIdReady = true;
|
||||||
loadedSceneId = id;
|
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();
|
TryInitializeReplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,6 +302,12 @@ namespace GhostSystem
|
|||||||
SetPlaybackTime(playbackSlider.value * totalDuration);
|
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;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -12,10 +15,12 @@ public class RoomManager : MonoBehaviour
|
|||||||
public List<GameObject> portals;
|
public List<GameObject> portals;
|
||||||
public List<GameObject> enemies;
|
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()
|
public void Awake()
|
||||||
{
|
{
|
||||||
|
ghostRecorder = FindFirstObjectByType<GhostRecorderBatch>();
|
||||||
if (myRoom == null)
|
if (myRoom == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("RoomPrefs is not assigned in RoomManager.");
|
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 && myRoom.furniture && !myRoom.portals && !myRoom.enemies) return;
|
||||||
if (myRoom.doors)
|
if (myRoom.doors)
|
||||||
{
|
{
|
||||||
foreach (GameObject door in doors) door.SetActive(true);
|
foreach (GameObject door in doors)
|
||||||
|
{
|
||||||
|
door.SetActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!myRoom.furniture)
|
if (!myRoom.furniture)
|
||||||
{
|
{
|
||||||
@@ -40,7 +48,7 @@ public class RoomManager : MonoBehaviour
|
|||||||
foreach (GameObject enemy in enemies) enemy.SetActive(true);
|
foreach (GameObject enemy in enemies) enemy.SetActive(true);
|
||||||
}
|
}
|
||||||
sceneId = myRoom.sceneId;
|
sceneId = myRoom.sceneId;
|
||||||
OnSceneIdReady?.Invoke(sceneId);
|
OnSceneIdReady?.Invoke(sceneId, doors);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,10 +20,10 @@ EditorBuildSettings:
|
|||||||
- enabled: 0
|
- enabled: 0
|
||||||
path: Assets/_Scenes/TestSceneMeta.unity
|
path: Assets/_Scenes/TestSceneMeta.unity
|
||||||
guid: 91bfb95032feb044c81a3964f5553fec
|
guid: 91bfb95032feb044c81a3964f5553fec
|
||||||
- enabled: 0
|
- enabled: 1
|
||||||
path: Assets/_Scenes/TestSceneMeta Offline.unity
|
path: Assets/_Scenes/TestSceneMeta Offline.unity
|
||||||
guid: b98b0de9fe670d2469cfbcd6e1d2d8f5
|
guid: b98b0de9fe670d2469cfbcd6e1d2d8f5
|
||||||
- enabled: 1
|
- enabled: 0
|
||||||
path: Assets/_Scenes/TrainingObserverMeta.unity
|
path: Assets/_Scenes/TrainingObserverMeta.unity
|
||||||
guid: 0572ea139ec37b84b88a8d21771f7f1a
|
guid: 0572ea139ec37b84b88a8d21771f7f1a
|
||||||
- enabled: 0
|
- enabled: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user