From 90d8a871784433aadbd989c365b62f3dc68c8a4e Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 27 Jul 2023 17:06:14 +0200 Subject: [PATCH 001/121] cameraconfig.json is now the default filename. --- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- Assets/Pilots/SoloPlayground/SoloPlayground.unity | 4 ++-- Assets/VRTCore/Editor/CopyConfigOnBuild.cs | 6 +++--- config.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index c25c19f1d..1e53bdd02 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2ee3532fe12e2de663405a411d5febec4af8ff4490f19172a6458c90e785fc81 -size 46385 +oid sha256:c2a4033b38966b5df8dd3dada2156f47d4067cefe739cbfaedd63b20c1d671c6 +size 46633 diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index 7f21cfcd2..bd3958eab 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a52249191230d26235a35eb707df8a2acfb235f8a8a49334977af0cad2ccc3cc -size 141295 +oid sha256:48d8019d6b23f4d1e13155ad30fd86ea4b4e915c6478d7e678b25096525c34c5 +size 142220 diff --git a/Assets/VRTCore/Editor/CopyConfigOnBuild.cs b/Assets/VRTCore/Editor/CopyConfigOnBuild.cs index 66ccde00c..163951b5e 100644 --- a/Assets/VRTCore/Editor/CopyConfigOnBuild.cs +++ b/Assets/VRTCore/Editor/CopyConfigOnBuild.cs @@ -37,10 +37,10 @@ public void OnPostprocessBuild(BuildReport report) File.Copy(srcDir + "config.json", dstDir + "config.json", true); Debug.Log($"CopyConfigOnBuild.OnPostProcessBuild copied config.json"); } - if (File.Exists(srcDir + "cameraconfig.xml")) + if (File.Exists(srcDir + "cameraconfig.json")) { - File.Copy(srcDir + "cameraconfig.xml", dstDir + "cameraconfig.xml", true); - Debug.Log($"CopyConfigOnBuild.OnPostProcessBuild copied cameraconfig.xml"); + File.Copy(srcDir + "cameraconfig.json", dstDir + "cameraconfig.json", true); + Debug.Log($"CopyConfigOnBuild.OnPostProcessBuild copied cameraconfig.json"); } diff --git a/config.json b/config.json index 4918ea866..c3867bc25 100644 --- a/config.json +++ b/config.json @@ -20,7 +20,7 @@ "PCSelfConfig": { "RS2ReaderConfig": { - "configFilename": "./cameraconfig.xml" + "configFilename": "./cameraconfig.json" }, "SynthReaderConfig": { "nPoints": 16000 From a455dbb9e9e71de4383cded190243695fb2a8362 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 27 Jul 2023 17:06:37 +0200 Subject: [PATCH 002/121] Updated cwipc_unity version. --- .../Mirror/Textures/MirrorSurfaceTexture.renderTexture | 6 ++++-- Packages/packages-lock.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/04_Props/Mirror/Textures/MirrorSurfaceTexture.renderTexture b/Assets/Pilots/Common/Prefabs/04_Props/Mirror/Textures/MirrorSurfaceTexture.renderTexture index 6d4cf2c09..f24b6c400 100644 --- a/Assets/Pilots/Common/Prefabs/04_Props/Mirror/Textures/MirrorSurfaceTexture.renderTexture +++ b/Assets/Pilots/Common/Prefabs/04_Props/Mirror/Textures/MirrorSurfaceTexture.renderTexture @@ -12,12 +12,13 @@ RenderTexture: Hash: 00000000000000000000000000000000 m_ForcedFallbackFormat: 4 m_DownscaleFallback: 0 - serializedVersion: 3 + m_IsAlphaChannelOptional: 0 + serializedVersion: 5 m_Width: 1000 m_Height: 1000 m_AntiAliasing: 1 m_MipCount: -1 - m_DepthFormat: 2 + m_DepthStencilFormat: 92 m_ColorFormat: 8 m_MipMap: 0 m_GenerateMips: 1 @@ -35,3 +36,4 @@ RenderTexture: m_WrapW: 1 m_Dimension: 2 m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 6da543c5d..ba936f0a6 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -182,7 +182,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "a75d14a8f70034bdcfd5710403f4611ce47924ee" + "hash": "1afcc3d5c8e9c08ce20ca58b66283b4e15702ad0" }, "com.unity.modules.androidjni": { "version": "1.0.0", From 18a17d22cf2acdb3d5f400f47f4238f4370c175b Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 27 Jul 2023 18:02:34 +0200 Subject: [PATCH 003/121] Updating various things for Quest. But it doesn't work yet: I get the splash screen and then nothing more. I can see from the log that the app thinks it is running, though... --- Assets/Pilots/SoloPlayground/SoloPlayground.unity | 4 ++-- .../PointClouds/Scripts/MarieAntoinette.cs | 3 --- .../PointClouds/Scripts/PointCloudPipelineSelf.cs | 3 --- Assets/VRTInitializer/VRTInitializer.asmdef | 3 ++- Assets/VRTInitializer/VRTInitializer.cs | 5 +++-- Assets/XR/Settings/Oculus Settings.asset | 6 +++++- Assets/XR/XRGeneralSettings.asset | 2 +- ProjectSettings/EditorBuildSettings.asset | 6 +++--- ProjectSettings/ProjectSettings.asset | 10 +++++----- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index bd3958eab..00278c399 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48d8019d6b23f4d1e13155ad30fd86ea4b4e915c6478d7e678b25096525c34c5 -size 142220 +oid sha256:fa8eff2140882be914c22323958148aaabeecc3801ecea1b892213b8ad4e4153 +size 142688 diff --git a/Assets/UserRepresentation/PointClouds/Scripts/MarieAntoinette.cs b/Assets/UserRepresentation/PointClouds/Scripts/MarieAntoinette.cs index 7c11f8ecb..f32b28cbc 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/MarieAntoinette.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/MarieAntoinette.cs @@ -1,6 +1,3 @@ -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.Eventing.Reader; using UnityEngine; namespace VRT.UserRepresentation.PointCloud diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs index e7dd3934b..690e8579f 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs @@ -1,6 +1,3 @@ -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Remoting.Messaging; using UnityEngine; using VRT.Core; #if VRT_WITH_STATS diff --git a/Assets/VRTInitializer/VRTInitializer.asmdef b/Assets/VRTInitializer/VRTInitializer.asmdef index 5b4f5fbed..8b49a2496 100644 --- a/Assets/VRTInitializer/VRTInitializer.asmdef +++ b/Assets/VRTInitializer/VRTInitializer.asmdef @@ -7,7 +7,8 @@ "Cwipc", "PointClouds", "WebCam", - "Pilots" + "Pilots", + "Unity.InputSystem" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/VRTInitializer/VRTInitializer.cs b/Assets/VRTInitializer/VRTInitializer.cs index e2a14f5c0..0b190939c 100644 --- a/Assets/VRTInitializer/VRTInitializer.cs +++ b/Assets/VRTInitializer/VRTInitializer.cs @@ -12,15 +12,16 @@ public class VRTInitializer : MonoBehaviour { + // Start is called before the first frame update void Awake() { + Debug.Log("Initializer: Initialize NegateProcessor"); + var tmp = new NegateProcessor(); Debug.Log("Initializer: Registering pipelines"); PointCloudPipelineSelf.Register(); PointCloudPipelineOther.Register(); WebCamPipeline.Register(); - Debug.Log("Initializer: Initialize NegateProcessor"); - var tmp = new NegateProcessor(); } private void OnApplicationQuit() diff --git a/Assets/XR/Settings/Oculus Settings.asset b/Assets/XR/Settings/Oculus Settings.asset index 82540897d..a65987200 100644 --- a/Assets/XR/Settings/Oculus Settings.asset +++ b/Assets/XR/Settings/Oculus Settings.asset @@ -13,17 +13,21 @@ MonoBehaviour: m_Name: Oculus Settings m_EditorClassIdentifier: m_StereoRenderingModeDesktop: 0 - m_StereoRenderingModeAndroid: 2 + m_StereoRenderingModeAndroid: 0 SharedDepthBuffer: 1 + DepthSubmission: 0 DashSupport: 1 LowOverheadMode: 0 OptimizeBufferDiscards: 1 PhaseSync: 0 SymmetricProjection: 1 SubsampledLayout: 0 + FoveatedRenderingMethod: 0 LateLatching: 0 LateLatchingDebug: 0 + EnableTrackingOriginStageMode: 0 SpaceWarp: 0 TargetQuest: 0 TargetQuest2: 1 + TargetQuestPro: 1 SystemSplashScreen: {fileID: 2800000, guid: 66f20aa4bf4c52740954d55e7d00009c, type: 3} diff --git a/Assets/XR/XRGeneralSettings.asset b/Assets/XR/XRGeneralSettings.asset index 2a11e338f..34fd140de 100644 --- a/Assets/XR/XRGeneralSettings.asset +++ b/Assets/XR/XRGeneralSettings.asset @@ -77,4 +77,4 @@ MonoBehaviour: m_AutomaticLoading: 0 m_AutomaticRunning: 0 m_Loaders: - - {fileID: 11400000, guid: 0c4d8b9e5ce402d44bd99110d0f9f36a, type: 2} + - {fileID: 11400000, guid: 13b43a4acfda05c449b9c4298dbb843e, type: 2} diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 2d5fad3c5..e16fe0cec 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -5,13 +5,13 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 1 + - enabled: 0 path: Assets/Pilots/LoginManager/Scenes/LoginManager.unity guid: 29732a909b44f204db3708ba9a91c2fc - - enabled: 1 + - enabled: 0 path: Assets/Pilots/Pilot0/Scenes/Pilot0.unity guid: 01e8d4050e184da48aba95c97a697601 - - enabled: 1 + - enabled: 0 path: Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity guid: 8d7c2248902f944f78d3799d2a8f1dba - enabled: 1 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 14bdf12ce..27183440f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -197,7 +197,7 @@ PlayerSettings: tvOS: 0 overrideDefaultApplicationIdentifier: 1 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 29 + AndroidMinSdkVersion: 30 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 0 aotOptions: @@ -456,8 +456,8 @@ PlayerSettings: m_GraphicsJobMode: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer - m_APIs: 0b000000 - m_Automatic: 0 + m_APIs: 15000000 + m_Automatic: 1 - m_BuildTarget: iOSSupport m_APIs: 10000000 m_Automatic: 1 @@ -752,7 +752,7 @@ PlayerSettings: webGLPowerPreference: 2 scriptingDefineSymbols: : UNITY_POST_PROCESSING_STACK_V2 - Android: UNITY_POST_PROCESSING_STACK_V2;BAKERY_INCLUDED;USE_INPUT_SYSTEM_POSE_CONTROL;USE_INPUT_SYSTEM_POSE_CONTROL + Android: UNITY_POST_PROCESSING_STACK_V2;BAKERY_INCLUDED;USE_INPUT_SYSTEM_POSE_CONTROL;VRT_WITH_STATS CloudRendering: UNITY_POST_PROCESSING_STACK_V2 EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 GameCoreXboxOne: UNITY_POST_PROCESSING_STACK_V2 @@ -792,7 +792,7 @@ PlayerSettings: allowUnsafeCode: 1 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 0 + selectedPlatform: 2 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 From 2e6b5f2b08d8194731afd16df73c79336f71e4da Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 12:24:06 +0200 Subject: [PATCH 004/121] Updated to Unity 2022.3.28 --- .../SoloPlayground/SoloPlayground.unity | 4 +- .../XR/Settings/OpenXR Package Settings.asset | 216 ++++++++++++++++++ Packages/manifest.json | 6 +- Packages/packages-lock.json | 19 +- ProjectSettings/ProjectSettings.asset | 2 +- ProjectSettings/ProjectVersion.txt | 4 +- 6 files changed, 234 insertions(+), 17 deletions(-) diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index 00278c399..d1e77cb26 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fa8eff2140882be914c22323958148aaabeecc3801ecea1b892213b8ad4e4153 -size 142688 +oid sha256:fd73a24b7583e89afa6d0e5e33468618c5e8ab61da412181329e91589c4e22da +size 143208 diff --git a/Assets/XR/Settings/OpenXR Package Settings.asset b/Assets/XR/Settings/OpenXR Package Settings.asset index 79dc63b6b..88cea9ffb 100644 --- a/Assets/XR/Settings/OpenXR Package Settings.asset +++ b/Assets/XR/Settings/OpenXR Package Settings.asset @@ -1,5 +1,25 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8343402579233336150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a24be4b5ebfe5f4d8ed1de9b25cb7aa, type: 3} + m_Name: HandCommonPosesInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Poses + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteractionposes + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 --- !u!114 &-6842804727474661199 MonoBehaviour: m_ObjectHideFlags: 0 @@ -154,6 +174,27 @@ MonoBehaviour: - visibleName: Quest Pro manifestName: cambria enabled: 1 + forceRemoveInternetPermission: 1 +--- !u!114 &-2216742607678651775 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f028123e2efe1d443875bc7609b4a98b, type: 3} + m_Name: PalmPoseInteraction Android + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Palm Pose + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.palmpose + openxrExtensionStrings: XR_EXT_palm_pose + company: Unity + priority: 0 + required: 0 --- !u!114 &-653570564930602669 MonoBehaviour: m_ObjectHideFlags: 0 @@ -272,6 +313,26 @@ MonoBehaviour: company: Unity priority: 0 required: 0 +--- !u!114 &1306792054085637015 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5019471fb2174e5c852ecd4047163007, type: 3} + m_Name: HandInteractionProfile Android + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteraction + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 --- !u!114 &1511487521552650307 MonoBehaviour: m_ObjectHideFlags: 0 @@ -292,6 +353,79 @@ MonoBehaviour: company: Unity priority: 0 required: 0 +--- !u!114 &1518369627977080531 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a24be4b5ebfe5f4d8ed1de9b25cb7aa, type: 3} + m_Name: HandCommonPosesInteraction Android + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Poses + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteractionposes + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 +--- !u!114 &1699861459637036257 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c5b5af5107e35a43818d5411328bfc3, type: 3} + m_Name: DPadInteraction Android + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: D-Pad Binding + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.dpadinteraction + openxrExtensionStrings: XR_KHR_binding_modification XR_EXT_dpad_binding + company: Unity + priority: 0 + required: 0 + forceThresholdLeft: 0.5 + forceThresholdReleaseLeft: 0.4 + centerRegionLeft: 0.5 + wedgeAngleLeft: 1.5707964 + isStickyLeft: 0 + forceThresholdRight: 0.5 + forceThresholdReleaseRight: 0.4 + centerRegionRight: 0.5 + wedgeAngleRight: 1.5707964 + isStickyRight: 0 + extensionStrings: + - XR_KHR_binding_modification + - XR_EXT_dpad_binding +--- !u!114 &1947417327896181923 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5315f812f023cf4ebf26f7e5d2d70f2, type: 3} + m_Name: HPReverbG2ControllerProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: HP Reverb G2 Controller Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.hpreverb + openxrExtensionStrings: XR_EXT_hp_mixed_reality_controller + company: Unity + priority: 0 + required: 0 --- !u!114 &2970495745050752953 MonoBehaviour: m_ObjectHideFlags: 0 @@ -306,7 +440,11 @@ MonoBehaviour: m_EditorClassIdentifier: features: - {fileID: 3069539478296136745} + - {fileID: 5536846507344931984} - {fileID: -2977001156943078257} + - {fileID: -8343402579233336150} + - {fileID: 4422392583732548048} + - {fileID: 1947417327896181923} - {fileID: -2609167643866981394} - {fileID: 40022076854454825} - {fileID: 8754654773137618634} @@ -314,6 +452,7 @@ MonoBehaviour: - {fileID: 1511487521552650307} - {fileID: -11043595896526592} - {fileID: -653570564930602669} + - {fileID: 6572396778764006666} - {fileID: -5784568033221399461} - {fileID: -6508012093054967455} m_renderMode: 0 @@ -353,6 +492,26 @@ MonoBehaviour: features: [] m_renderMode: 1 m_depthSubmissionMode: 0 +--- !u!114 &4422392583732548048 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5019471fb2174e5c852ecd4047163007, type: 3} + m_Name: HandInteractionProfile Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Hand Interaction Profile + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.handinteraction + openxrExtensionStrings: XR_EXT_hand_interaction + company: Unity + priority: 0 + required: 0 --- !u!114 &4947855557754190537 MonoBehaviour: m_ObjectHideFlags: 0 @@ -373,6 +532,39 @@ MonoBehaviour: company: Unity priority: 0 required: 0 +--- !u!114 &5536846507344931984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9c5b5af5107e35a43818d5411328bfc3, type: 3} + m_Name: DPadInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: D-Pad Binding + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.dpadinteraction + openxrExtensionStrings: XR_KHR_binding_modification XR_EXT_dpad_binding + company: Unity + priority: 0 + required: 0 + forceThresholdLeft: 0.5 + forceThresholdReleaseLeft: 0.4 + centerRegionLeft: 0.5 + wedgeAngleLeft: 1.5707964 + isStickyLeft: 0 + forceThresholdRight: 0.5 + forceThresholdReleaseRight: 0.4 + centerRegionRight: 0.5 + wedgeAngleRight: 1.5707964 + isStickyRight: 0 + extensionStrings: + - XR_KHR_binding_modification + - XR_EXT_dpad_binding --- !u!114 &5612614716933213126 MonoBehaviour: m_ObjectHideFlags: 0 @@ -413,6 +605,26 @@ MonoBehaviour: company: Unity priority: 0 required: 0 +--- !u!114 &6572396778764006666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f028123e2efe1d443875bc7609b4a98b, type: 3} + m_Name: PalmPoseInteraction Standalone + m_EditorClassIdentifier: + m_enabled: 0 + nameUi: Palm Pose + version: 0.0.1 + featureIdInternal: com.unity.openxr.feature.input.palmpose + openxrExtensionStrings: XR_EXT_palm_pose + company: Unity + priority: 0 + required: 0 --- !u!114 &7395863965511742115 MonoBehaviour: m_ObjectHideFlags: 0 @@ -469,7 +681,10 @@ MonoBehaviour: m_EditorClassIdentifier: features: - {fileID: 6546594057913008775} + - {fileID: 1699861459637036257} - {fileID: -567765898694903002} + - {fileID: 1518369627977080531} + - {fileID: 1306792054085637015} - {fileID: 230666773991551508} - {fileID: -2575696433477797038} - {fileID: 7395863965511742115} @@ -477,6 +692,7 @@ MonoBehaviour: - {fileID: 8616995885321310214} - {fileID: -6842804727474661199} - {fileID: 5612614716933213126} + - {fileID: -2216742607678651775} - {fileID: 7418508634844643388} m_renderMode: 1 m_depthSubmissionMode: 0 diff --git a/Packages/manifest.json b/Packages/manifest.json index 7e55ff3a3..b0fea3cb6 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,15 +2,15 @@ "dependencies": { "com.unity.animation.rigging": "1.1.1", "com.unity.ide.visualstudio": "2.0.18", - "com.unity.inputsystem": "1.5.1", + "com.unity.inputsystem": "1.6.1", "com.unity.postprocessing": "3.2.2", "com.unity.recorder": "3.0.3", "com.unity.textmeshpro": "3.0.6", "com.unity.ugui": "1.0.0", - "com.unity.xr.interaction.toolkit": "2.3.1", + "com.unity.xr.interaction.toolkit": "2.4.0", "com.unity.xr.management": "4.3.3", "com.unity.xr.oculus": "3.3.0", - "com.unity.xr.openxr": "1.7.0", + "com.unity.xr.openxr": "1.8.1", "nl.cwi.dis.cwipc": "git+https://github.com/cwi-dis/cwipc_unity?path=/nl.cwi.dis.cwipc", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.assetbundle": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index ba936f0a6..52bff7fa2 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -36,7 +36,7 @@ "url": "https://packages.unity.com" }, "com.unity.inputsystem": { - "version": "1.5.1", + "version": "1.6.1", "depth": 0, "source": "registry", "dependencies": { @@ -70,7 +70,7 @@ "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.1.31", + "version": "1.1.33", "depth": 1, "source": "registry", "dependencies": { @@ -90,7 +90,7 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.6.4", + "version": "1.6.5", "depth": 1, "source": "registry", "dependencies": { @@ -111,7 +111,7 @@ } }, "com.unity.xr.core-utils": { - "version": "2.2.0", + "version": "2.2.1", "depth": 1, "source": "registry", "dependencies": { @@ -120,14 +120,14 @@ "url": "https://packages.unity.com" }, "com.unity.xr.interaction.toolkit": { - "version": "2.3.1", + "version": "2.4.0", "depth": 0, "source": "registry", "dependencies": { - "com.unity.inputsystem": "1.4.4", + "com.unity.inputsystem": "1.5.0", "com.unity.mathematics": "1.2.6", "com.unity.ugui": "1.0.0", - "com.unity.xr.core-utils": "2.2.0", + "com.unity.xr.core-utils": "2.2.1", "com.unity.xr.legacyinputhelpers": "2.1.10", "com.unity.modules.audio": "1.0.0", "com.unity.modules.imgui": "1.0.0", @@ -167,13 +167,14 @@ "url": "https://packages.unity.com" }, "com.unity.xr.openxr": { - "version": "1.7.0", + "version": "1.8.1", "depth": 0, "source": "registry", "dependencies": { "com.unity.xr.management": "4.0.1", "com.unity.xr.legacyinputhelpers": "2.1.2", - "com.unity.inputsystem": "1.4.4" + "com.unity.inputsystem": "1.4.4", + "com.unity.xr.core-utils": "2.1.1" }, "url": "https://packages.unity.com" }, diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 27183440f..a83469ad2 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -792,7 +792,7 @@ PlayerSettings: allowUnsafeCode: 1 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 2 + selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 6c676f051..9cd738f3a 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.3.24f1 -m_EditorVersionWithRevision: 2021.3.24f1 (cf10dcf7010d) +m_EditorVersion: 2021.3.28f1 +m_EditorVersionWithRevision: 2021.3.28f1 (232e59c3f087) From 848b6cdd354ffa5a75aedf504beed5b13a886ec5 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 13:37:24 +0200 Subject: [PATCH 005/121] Quest build is starting to work. --- Assets/XR/Settings/Oculus Settings.asset | 2 +- Assets/XR/XRGeneralSettings.asset | 2 +- ProjectSettings/BurstAotSettings_Android.json | 14 +++++++++ ProjectSettings/ProjectSettings.asset | 31 +++++++++++-------- 4 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 ProjectSettings/BurstAotSettings_Android.json diff --git a/Assets/XR/Settings/Oculus Settings.asset b/Assets/XR/Settings/Oculus Settings.asset index a65987200..bdca57148 100644 --- a/Assets/XR/Settings/Oculus Settings.asset +++ b/Assets/XR/Settings/Oculus Settings.asset @@ -20,7 +20,7 @@ MonoBehaviour: LowOverheadMode: 0 OptimizeBufferDiscards: 1 PhaseSync: 0 - SymmetricProjection: 1 + SymmetricProjection: 0 SubsampledLayout: 0 FoveatedRenderingMethod: 0 LateLatching: 0 diff --git a/Assets/XR/XRGeneralSettings.asset b/Assets/XR/XRGeneralSettings.asset index 34fd140de..dc3467ee8 100644 --- a/Assets/XR/XRGeneralSettings.asset +++ b/Assets/XR/XRGeneralSettings.asset @@ -60,7 +60,7 @@ MonoBehaviour: m_Name: Android Settings m_EditorClassIdentifier: m_LoaderManagerInstance: {fileID: 8242226716859910042} - m_InitManagerOnStart: 0 + m_InitManagerOnStart: 1 --- !u!114 &8242226716859910042 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/ProjectSettings/BurstAotSettings_Android.json b/ProjectSettings/BurstAotSettings_Android.json new file mode 100644 index 000000000..771d37b73 --- /dev/null +++ b/ProjectSettings/BurstAotSettings_Android.json @@ -0,0 +1,14 @@ +{ + "MonoBehaviour": { + "Version": 4, + "EnableBurstCompilation": true, + "EnableOptimisations": true, + "EnableSafetyChecks": false, + "EnableDebugInAllBuilds": false, + "CpuMinTargetX32": 0, + "CpuMaxTargetX32": 0, + "CpuMinTargetX64": 0, + "CpuMaxTargetX64": 0, + "OptimizeFor": 0 + } +} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index a83469ad2..cd61df92e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -53,7 +53,7 @@ PlayerSettings: m_MTRendering: 1 mipStripping: 0 numberOfMipsStripped: 0 - m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + m_StackTraceTypes: 020000000200000001000000010000000200000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosUseCustomAppBackgroundBehavior: 0 @@ -87,7 +87,7 @@ PlayerSettings: hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 - bakeCollisionMeshes: 1 + bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 resizableWindow: 0 @@ -126,8 +126,8 @@ PlayerSettings: stadiaPresentMode: 0 stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 - vulkanEnableSetSRGBWrite: 1 - vulkanEnablePreTransform: 0 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 1 vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 m_SupportedAspectRatios: @@ -199,7 +199,7 @@ PlayerSettings: AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 30 AndroidTargetSdkVersion: 0 - AndroidPreferredInstallLocation: 0 + AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 iPhoneStrippingLevel: 0 @@ -208,7 +208,7 @@ PlayerSettings: ForceSDCardPermission: 0 CreateWallpaper: 0 APKExpansionFiles: 0 - keepLoadedShadersAlive: 1 + keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 1 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 @@ -498,9 +498,15 @@ PlayerSettings: m_BuildTargetGroupLightmapEncodingQuality: - m_BuildTarget: Standalone m_EncodingQuality: 1 + - m_BuildTarget: Android + m_EncodingQuality: 1 m_BuildTargetGroupLightmapSettings: [] - m_BuildTargetNormalMapEncoding: [] - m_BuildTargetDefaultTextureCompressionFormat: [] + m_BuildTargetNormalMapEncoding: + - m_BuildTarget: Android + m_Encoding: 1 + m_BuildTargetDefaultTextureCompressionFormat: + - m_BuildTarget: Android + m_Format: 3 playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -752,7 +758,7 @@ PlayerSettings: webGLPowerPreference: 2 scriptingDefineSymbols: : UNITY_POST_PROCESSING_STACK_V2 - Android: UNITY_POST_PROCESSING_STACK_V2;BAKERY_INCLUDED;USE_INPUT_SYSTEM_POSE_CONTROL;VRT_WITH_STATS + Android: UNITY_POST_PROCESSING_STACK_V2;BAKERY_INCLUDED;USE_INPUT_SYSTEM_POSE_CONTROL;VRT_WITH_STATS;CWIPC_WITH_LOGGING CloudRendering: UNITY_POST_PROCESSING_STACK_V2 EmbeddedLinux: UNITY_POST_PROCESSING_STACK_V2 GameCoreXboxOne: UNITY_POST_PROCESSING_STACK_V2 @@ -773,7 +779,7 @@ PlayerSettings: Android: 1 il2cppCompilerConfiguration: {} managedStrippingLevel: - Android: 1 + Android: 4 EmbeddedLinux: 1 GameCoreScarlett: 1 GameCoreXboxOne: 1 @@ -789,10 +795,9 @@ PlayerSettings: tvOS: 1 incrementalIl2cppBuild: {} suppressCommonWarnings: 1 - allowUnsafeCode: 1 + allowUnsafeCode: 0 useDeterministicCompilation: 1 enableRoslynAnalyzers: 1 - selectedPlatform: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 @@ -881,7 +886,7 @@ PlayerSettings: projectName: organizationId: cloudEnabled: 0 - legacyClampBlendShapeWeights: 1 + legacyClampBlendShapeWeights: 0 playerDataPath: forceSRGBBlit: 1 virtualTexturingSupportEnabled: 0 From 9c38f30415b5e5d59040331718890b14c5f95e66 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 14:17:18 +0200 Subject: [PATCH 006/121] We don't need player. Ensure the playerManager is active. --- .../Pilots/Common/Controllers/PilotControllerSoloExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs b/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs index 062d1eeee..e53a7efff 100644 --- a/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs +++ b/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs @@ -11,8 +11,6 @@ namespace VRT.Pilots.Common /// public class PilotControllerSoloExtensions : MonoBehaviour { - [Tooltip("The user (for enabling isLocal)")] - public VRT.Pilots.Common.PlayerNetworkControllerBase player; [Tooltip("The user (for setup camera position and input/output)")] public PlayerControllerSelf playerManager; [Tooltip("User representation")] @@ -37,6 +35,7 @@ public void Start() Debug.LogError($"{name}: playerManager field not set"); return; } + playerManager.gameObject.SetActive(true); playerManager.SetUpPlayerController(true, user); } From f7c85af68b9e8cd17e392535a1ee7248b36f26f5 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 15:36:20 +0200 Subject: [PATCH 007/121] - Initialize NegateProcessor before scene load. - Always define constructor, also in player. These may fix #104 but needs to be tested. --- Assets/Pilots/Common/Interaction/InputAdditions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/InputAdditions.cs b/Assets/Pilots/Common/Interaction/InputAdditions.cs index abe559160..0c76f0ffa 100644 --- a/Assets/Pilots/Common/Interaction/InputAdditions.cs +++ b/Assets/Pilots/Common/Interaction/InputAdditions.cs @@ -14,14 +14,12 @@ public class NegateProcessor : InputProcessor { -#if UNITY_EDITOR static NegateProcessor() { Initialize(); } -#endif - [RuntimeInitializeOnLoadMethod] + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void Initialize() { Debug.Log("NegateProcessor: registering with Input System"); From acbcad60590b0eba36b20859dd8d06bd37ad9446 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 15:36:40 +0200 Subject: [PATCH 008/121] Reset stack traces settings to what it was. --- ProjectSettings/ProjectSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index cd61df92e..428641b2a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -53,7 +53,7 @@ PlayerSettings: m_MTRendering: 1 mipStripping: 0 numberOfMipsStripped: 0 - m_StackTraceTypes: 020000000200000001000000010000000200000001000000 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosUseCustomAppBackgroundBehavior: 0 From 7b58feaa53d07776c6d63d5eaf14de4a3f53b048 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 15:47:17 +0200 Subject: [PATCH 009/121] Enabled all relevant scenes in Quest build. --- ProjectSettings/EditorBuildSettings.asset | 6 +++--- ProjectSettings/ProjectSettings.asset | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index e16fe0cec..2d5fad3c5 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -5,13 +5,13 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 0 + - enabled: 1 path: Assets/Pilots/LoginManager/Scenes/LoginManager.unity guid: 29732a909b44f204db3708ba9a91c2fc - - enabled: 0 + - enabled: 1 path: Assets/Pilots/Pilot0/Scenes/Pilot0.unity guid: 01e8d4050e184da48aba95c97a697601 - - enabled: 0 + - enabled: 1 path: Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity guid: 8d7c2248902f944f78d3799d2a8f1dba - enabled: 1 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 428641b2a..b99d42a42 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -170,6 +170,9 @@ PlayerSettings: - {fileID: 0} - {fileID: 0} - {fileID: 0} + - {fileID: 7859600157304724526, guid: 07b89c69e2e80b649aca926d85d21f2f, type: 2} + - {fileID: 6869665334008911177, guid: 67666cd371ed9e94fac99fca7647c6e1, type: 2} + - {fileID: 11400000, guid: b916857db71260845a232a451a163c3b, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 From c00c32f85a41851adb642c1a20c27ecf43315335 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 31 Jul 2023 16:59:50 +0200 Subject: [PATCH 010/121] Gross hack to allow entering your user credentials on Quest: temporarily enable this AndroidManifest after removing the tilde from the filename, build and run, register. Then remove again. --- Assets/Plugins.meta | 8 ++ Assets/Plugins/Android~/AndroidManifest.xml | 111 ++++++++++++++++++ .../Plugins/Android~/AndroidManifest.xml.meta | 7 ++ ProjectSettings/ProjectSettings.asset | 3 - 4 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 Assets/Plugins.meta create mode 100644 Assets/Plugins/Android~/AndroidManifest.xml create mode 100644 Assets/Plugins/Android~/AndroidManifest.xml.meta diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 000000000..103c0ff01 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ebbef8b9ee5e5e34b80de57bcb856953 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Android~/AndroidManifest.xml b/Assets/Plugins/Android~/AndroidManifest.xml new file mode 100644 index 000000000..7f34534ea --- /dev/null +++ b/Assets/Plugins/Android~/AndroidManifest.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Plugins/Android~/AndroidManifest.xml.meta b/Assets/Plugins/Android~/AndroidManifest.xml.meta new file mode 100644 index 000000000..e9f3110a8 --- /dev/null +++ b/Assets/Plugins/Android~/AndroidManifest.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ba6d045cf207abd409e8b81ba2a8d8d5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b99d42a42..428641b2a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -170,9 +170,6 @@ PlayerSettings: - {fileID: 0} - {fileID: 0} - {fileID: 0} - - {fileID: 7859600157304724526, guid: 07b89c69e2e80b649aca926d85d21f2f, type: 2} - - {fileID: 6869665334008911177, guid: 67666cd371ed9e94fac99fca7647c6e1, type: 2} - - {fileID: 11400000, guid: b916857db71260845a232a451a163c3b, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 From 01a3cdfc4db28b859bd398c65b8721afe100bf9b Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 11:52:21 +0200 Subject: [PATCH 011/121] Added cameraconfig.json --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 034e2db28..65d4c8fda 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ dlls/ Testbed.sln Assembly-CSharp.csproj cameraconfig.xml +cameraconfig.json .collabignore *.csproj *.sln From ef3f187e712a97da65bc0124b055163ac4428718 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 13:48:58 +0200 Subject: [PATCH 012/121] Adding debug option, trying to find why the controllers don't work as expected. --- .../Interaction/HandVisualController.cs | 13 +++++-- .../Common/Interaction/VRTInputController.cs | 34 +++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/HandVisualController.cs b/Assets/Pilots/Common/Interaction/HandVisualController.cs index 3f0ddf5ca..2318d5f22 100644 --- a/Assets/Pilots/Common/Interaction/HandVisualController.cs +++ b/Assets/Pilots/Common/Interaction/HandVisualController.cs @@ -28,6 +28,9 @@ public class HandVisualController : MonoBehaviour [Tooltip("Current controller type")] [DisableEditing] [SerializeField] ControllerType controllerType = ControllerType.None; + [Tooltip("Enable debug logging")] + [SerializeField] bool debug = false; + public void Awake() { if (inputController == null) @@ -48,6 +51,10 @@ private void OnDestroy() private void DisableInteraction() { + if (debug) + { + Debug.Log($"HandVisualController: disable interaction"); + } directInteractionInputObject.SetActive(false); rayBasedInputObject.SetActive(false); } @@ -55,6 +62,10 @@ private void DisableInteraction() void FixRepresentation(ControllerType _controllerType) { controllerType = _controllerType; + if (debug) + { + Debug.Log($"HandVisualController: FixRepresentation type={controllerType}"); + } directInteractionInputObject.SetActive(controllerType == ControllerType.VirtualHand); rayBasedInputObject.SetActive(controllerType != ControllerType.VirtualHand); // xxxjack how about None? OculusController.SetActive(controllerType == ControllerType.Oculus); @@ -66,7 +77,5 @@ void OnControllerChanged() { FixRepresentation(inputController.currentVisibleController); } - - } } diff --git a/Assets/Pilots/Common/Interaction/VRTInputController.cs b/Assets/Pilots/Common/Interaction/VRTInputController.cs index f527e6b9c..c48be77da 100644 --- a/Assets/Pilots/Common/Interaction/VRTInputController.cs +++ b/Assets/Pilots/Common/Interaction/VRTInputController.cs @@ -39,6 +39,9 @@ public enum ControllerType [Tooltip("Callbacks called when the controller changes")] public System.Action controllerChanged; + [Tooltip("Introspection/Debug: print log messages")] + [SerializeField] bool debug = false; + [Tooltip("Introspection/debug: is direct interaction currently enabled")] [DisableEditing][SerializeField] private bool directInteractionIsEnabled; @@ -85,10 +88,33 @@ ControllerType FindAttachedController() foreach (var inDev in deviceList) { if (!inDev.isValid) continue; + if (debug) + { + Debug.Log($"VRTInputController: examine device \"{inDev.name}\""); + } if ((inDev.characteristics & InputDeviceCharacteristics.Controller) == 0) continue; + foundController = true; - if (inDev.name.Contains("Oculus Touch Controller")) foundOculusController = true; - if (inDev.name.Contains("HTC Vive Controller")) foundViveController = true; + if (debug) + { + Debug.Log($"VRTInputController: is a controller"); + } + if (inDev.name.Contains("Oculus Touch Controller")) + { + foundOculusController = true; + if (debug) + { + Debug.Log($"VRTInputController: is Oculus Controller"); + } + } + if (inDev.name.Contains("HTC Vive Controller")) + { + foundViveController = true; + if (debug) + { + Debug.Log($"VRTInputController: is Vive controller"); + } + } } if (foundOculusController) return ControllerType.Oculus; if (foundViveController) return ControllerType.Vive; @@ -108,6 +134,10 @@ void OnDeviceChanged(InputDevice value) void OnRealControllerChanged(ControllerType newController) { + if (debug) + { + Debug.Log($"VRTInputController: controllerType={newController}, directInteraction={directInteractionIsEnabled}"); + } m_currentRealController = newController; m_currentVisibleController = m_currentRealController; if (directInteractionIsEnabled) From a8131f25ec01b6cccb4343533bf5a657384f9a3a Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 14:12:24 +0200 Subject: [PATCH 013/121] Removed versionLog component. --- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 1e53bdd02..03779e322 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c2a4033b38966b5df8dd3dada2156f47d4067cefe739cbfaedd63b20c1d671c6 -size 46633 +oid sha256:e14ee37567c89704d6fbaea59e60307558b09b152016106d68df76791d005b29 +size 48968 From ac1c5190131f9c9095486c0a3ae4e4ef763aa30c Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:05:25 +0200 Subject: [PATCH 014/121] Don't auto-create orchestrator component. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index fff66d7a9..badb19f50 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -103,7 +103,8 @@ public enum orchestratorConnectionStatus { public static OrchestratorController Instance { get { if (instance is null) { - instance = new GameObject("OrchestratorController").AddComponent(); + Debug.LogError("OrchestratorController.Instance called before Awake"); + //instance = new GameObject("OrchestratorController").AddComponent(); } return instance; } @@ -203,12 +204,13 @@ public void StartRetrievingData() { #region Unity private void Awake() { + Debug.Log($"xxxjack OrchestratorController.Awake from {gameObject.name}"); DontDestroyOnLoad(this); if (instance == null) { instance = this; } else { - Debug.LogError("OrchestratorController: attempt to create second instance"); + Debug.LogError($"OrchestratorController: attempt to create second instance from GameObject {gameObject.name}. First from {instance.gameObject.name}."); Destroy(gameObject); } } @@ -219,6 +221,8 @@ void Start() } private void OnDestroy() { + Debug.Log($"xxxjack OrchestratorController.OnDestroy from {gameObject.name}"); + if (mySession != null) { Collect_SFU_Logs(mySession.sessionId); #if VRT_WITH_STATS From 9b362bdc47dc9bb493f9ecce8654a49629b8a7b1 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:06:13 +0200 Subject: [PATCH 015/121] Register eventType later (so we don't have Awake race condition) --- .../Common/Networking/HandNetworkControllerBase.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs b/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs index f9a6a7785..5b8b01594 100644 --- a/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs +++ b/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs @@ -51,17 +51,12 @@ public virtual VRTGrabbableController HeldGrabbable protected PlayerNetworkControllerBase _Player; - public void Awake() - { - _Player = GetComponentInParent(); - OrchestratorController.Instance.RegisterEventType(MessageTypeID.TID_HandControllerData, typeof(HandNetworkControllerBase.HandControllerData)); - } - protected virtual void Start() { _Player = GetComponentInParent(); - OrchestratorController.Instance.Subscribe(OnHandControllerData); + OrchestratorController.Instance.RegisterEventType(MessageTypeID.TID_HandControllerData, typeof(HandNetworkControllerBase.HandControllerData)); + OrchestratorController.Instance.Subscribe(OnHandControllerData); } private void OnDestroy() From ad83387dab3b8fc969368ebccd64308d77f58c80 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:08:18 +0200 Subject: [PATCH 016/121] Removed versionLog component. --- Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 43e27859e..3418a0a26 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -553,7 +553,7 @@ void Start() developerModeButton.isOn = developerMode; // Update Application version orchURLText.text = VRTConfig.Instance.orchestratorURL; - nativeVerText.text = VersionLog.Instance.NativeClient; + if (VersionLog.Instance != null) nativeVerText.text = VersionLog.Instance.NativeClient; playerVerText.text = "v" + Application.version; orchVerText.text = ""; From 450ee3766a98d2695576305047012bfa95410c31 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:08:47 +0200 Subject: [PATCH 017/121] Don't show popup for overlay keyboard on Quest. --- Assets/VRTCore/ErrorManager.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/VRTCore/ErrorManager.cs b/Assets/VRTCore/ErrorManager.cs index bfe6af575..9d3783dff 100644 --- a/Assets/VRTCore/ErrorManager.cs +++ b/Assets/VRTCore/ErrorManager.cs @@ -105,7 +105,10 @@ private void Application_logMessageReceived(string condition, string stackTrace, else if (type == LogType.Error) { error[0] = "Error"; + // Don't show a popup for BestHTTP error messages if (stackTrace.Contains("BestHTTP")) return; + // Don't show a popup for Quest virtual keyboard not enabled. + if (condition.Contains("overlay keyboard is disabled")) return; lock (thisLock) { queue.Add(error); From c61b6d3a4fbdcc7999e59641c13118f79865e20c Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:09:19 +0200 Subject: [PATCH 018/121] unused private string attribute got removed by il2cpp optimizer, giving a warning. Get rid of it. --- Assets/ExternalAssets/VR2G-nativeLibraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ExternalAssets/VR2G-nativeLibraries b/Assets/ExternalAssets/VR2G-nativeLibraries index a6d2fb5bd..5909fe522 160000 --- a/Assets/ExternalAssets/VR2G-nativeLibraries +++ b/Assets/ExternalAssets/VR2G-nativeLibraries @@ -1 +1 @@ -Subproject commit a6d2fb5bdef95c843fd6fd41b1eb31f1f7950293 +Subproject commit 5909fe522ef4eccc00f86c2649ef824df626193c From 04310d3073413c2497a91becd8201fb5eb4f3546 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 1 Aug 2023 15:09:33 +0200 Subject: [PATCH 019/121] More debug prints. --- Assets/Pilots/Common/Interaction/VRTInputController.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VRTInputController.cs b/Assets/Pilots/Common/Interaction/VRTInputController.cs index c48be77da..90399f248 100644 --- a/Assets/Pilots/Common/Interaction/VRTInputController.cs +++ b/Assets/Pilots/Common/Interaction/VRTInputController.cs @@ -85,13 +85,18 @@ ControllerType FindAttachedController() bool foundOculusController = false; bool foundViveController = false; bool foundController = false; + if (debug) + { + Debug.Log($"VRTInputController: examine {deviceList.Count} devices"); + } foreach (var inDev in deviceList) { - if (!inDev.isValid) continue; if (debug) { - Debug.Log($"VRTInputController: examine device \"{inDev.name}\""); + Debug.Log($"VRTInputController: examine device \"{inDev.name}\", valid={inDev.isValid}"); } + if (!inDev.isValid) continue; + if ((inDev.characteristics & InputDeviceCharacteristics.Controller) == 0) continue; foundController = true; From 05df6cbb1cbe06828f05d110f2d9ff6386918425 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 11:18:07 +0200 Subject: [PATCH 020/121] Reverted InputProcessor initialization to the Unity standard. Things work again for desktop. --- Assets/Pilots/Common/Controllers/PilotController.cs | 3 +-- Assets/Pilots/Common/Interaction/InputAdditions.cs | 3 ++- Assets/VRTInitializer/VRTInitializer.cs | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Assets/Pilots/Common/Controllers/PilotController.cs b/Assets/Pilots/Common/Controllers/PilotController.cs index bf9e042e4..949067e13 100644 --- a/Assets/Pilots/Common/Controllers/PilotController.cs +++ b/Assets/Pilots/Common/Controllers/PilotController.cs @@ -49,8 +49,7 @@ public virtual void Awake() Debug.LogError("PilotController: multiple PilotController (subclass) instances in scene"); } Instance = this; - var tmp = new NegateProcessor(); - } + } /// /// Call this method to load a new scene (optionally after fading out the current scene). diff --git a/Assets/Pilots/Common/Interaction/InputAdditions.cs b/Assets/Pilots/Common/Interaction/InputAdditions.cs index 0c76f0ffa..dca6aa9a4 100644 --- a/Assets/Pilots/Common/Interaction/InputAdditions.cs +++ b/Assets/Pilots/Common/Interaction/InputAdditions.cs @@ -13,11 +13,12 @@ #endif public class NegateProcessor : InputProcessor { - +#if UNITY_EDITOR static NegateProcessor() { Initialize(); } +#endif [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void Initialize() diff --git a/Assets/VRTInitializer/VRTInitializer.cs b/Assets/VRTInitializer/VRTInitializer.cs index 0b190939c..1c9836cef 100644 --- a/Assets/VRTInitializer/VRTInitializer.cs +++ b/Assets/VRTInitializer/VRTInitializer.cs @@ -16,9 +16,7 @@ public class VRTInitializer : MonoBehaviour // Start is called before the first frame update void Awake() { - Debug.Log("Initializer: Initialize NegateProcessor"); - var tmp = new NegateProcessor(); - Debug.Log("Initializer: Registering pipelines"); + Debug.Log("Initializer: Registering pipelines"); PointCloudPipelineSelf.Register(); PointCloudPipelineOther.Register(); WebCamPipeline.Register(); From 9b13b8b334a30e6f3edc5866809c5849d3bea2b4 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 11:30:45 +0200 Subject: [PATCH 021/121] Unsure... --- ProjectSettings/ProjectSettings.asset | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 428641b2a..b99d42a42 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -170,6 +170,9 @@ PlayerSettings: - {fileID: 0} - {fileID: 0} - {fileID: 0} + - {fileID: 7859600157304724526, guid: 07b89c69e2e80b649aca926d85d21f2f, type: 2} + - {fileID: 6869665334008911177, guid: 67666cd371ed9e94fac99fca7647c6e1, type: 2} + - {fileID: 11400000, guid: b916857db71260845a232a451a163c3b, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 From 9c5896083eb3236d1aa3b83aa87b02952ecf8118 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 11:35:35 +0200 Subject: [PATCH 022/121] Set desktop player to use Oculus XR loader (in stead of OpenXR loader). The issues with the controllers now happen on the desktop too, so the problem is probably with the XR loader, not with the Quest per se. --- Assets/XR/XRGeneralSettings.asset | 2 +- ProjectSettings/ProjectSettings.asset | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/XR/XRGeneralSettings.asset b/Assets/XR/XRGeneralSettings.asset index dc3467ee8..598d17475 100644 --- a/Assets/XR/XRGeneralSettings.asset +++ b/Assets/XR/XRGeneralSettings.asset @@ -46,7 +46,7 @@ MonoBehaviour: m_AutomaticLoading: 0 m_AutomaticRunning: 0 m_Loaders: - - {fileID: 11400000, guid: 0c4d8b9e5ce402d44bd99110d0f9f36a, type: 2} + - {fileID: 11400000, guid: 13b43a4acfda05c449b9c4298dbb843e, type: 2} --- !u!114 &6869665334008911177 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index b99d42a42..428641b2a 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -170,9 +170,6 @@ PlayerSettings: - {fileID: 0} - {fileID: 0} - {fileID: 0} - - {fileID: 7859600157304724526, guid: 07b89c69e2e80b649aca926d85d21f2f, type: 2} - - {fileID: 6869665334008911177, guid: 67666cd371ed9e94fac99fca7647c6e1, type: 2} - - {fileID: 11400000, guid: b916857db71260845a232a451a163c3b, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 From 8a11b2498a8e167c39b200d1d80690aac0b346f7 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 12:14:48 +0200 Subject: [PATCH 023/121] Fixed HUD show/hide by using a generic controller path to the control. Now works for both OpenXR and Oculus XR plugins. --- Assets/Pilots/Common/Interaction/VR2Gather.inputactions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index 0c29f350c..436a40b2f 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -2800,10 +2800,10 @@ { "name": "", "id": "f9b82e7c-5363-4585-9d12-b86c925ddfbf", - "path": "/secondaryButton", + "path": "{LeftHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus;Generic XR Controller", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2811,10 +2811,10 @@ { "name": "", "id": "d634b2ce-d7d5-41ca-9f72-e280a86e63d1", - "path": "{RightHand}/secondaryButton", + "path": "{RightHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus;Generic XR Controller", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false From 9e7838965c61802f4f2d8149a63d29bba8fc74c5 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 12:20:14 +0200 Subject: [PATCH 024/121] Turn now also works for Oculus and generic. --- Assets/Pilots/Common/Interaction/VR2Gather.inputactions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index 436a40b2f..7ab6455b8 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -815,10 +815,10 @@ { "name": "", "id": "99cb7ad1-51ec-4611-af68-92a85f2c17d6", - "path": "{LeftHand}/Primary2DAxis", + "path": "{LeftHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus", + "groups": "Oculus;Generic XR Controller", "action": "Turn", "isComposite": false, "isPartOfComposite": false @@ -1657,10 +1657,10 @@ { "name": "", "id": "d6c08c3d-3d41-4695-994d-1ac9016a5a9e", - "path": "{RightHand}/Primary2DAxis", + "path": "{RightHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus", + "groups": "Oculus;Generic XR Controller", "action": "Turn", "isComposite": false, "isPartOfComposite": false From baf48e33029a9271156bce46c4bfa80d1bb63959 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 12:34:04 +0200 Subject: [PATCH 025/121] Got rid of a lot of unneeded action duplication for Oculus: the generic XR controller actions work just as well. --- .../Common/Interaction/VR2Gather.inputactions | 418 +----------------- 1 file changed, 22 insertions(+), 396 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index 7ab6455b8..e2248136a 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -325,7 +325,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -336,7 +336,7 @@ "path": "{LeftHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -347,7 +347,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -358,7 +358,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -369,7 +369,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -380,7 +380,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -424,7 +424,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -435,7 +435,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -457,7 +457,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -468,7 +468,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -495,200 +495,13 @@ "isComposite": false, "isPartOfComposite": true }, - { - "name": "", - "id": "642a0165-a77b-4312-bc78-094628529c91", - "path": "{LeftHand}/gripPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Select", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8d46a020-c419-4a16-ac74-71152588e6e8", - "path": "{LeftHand}/grip", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Select Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "57e5d4d2-0b8b-4e18-9eaf-05e8e6d10fc7", - "path": "{LeftHand}/triggerPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Activate", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a956c9aa-638e-44da-8d0c-13c0f7908ac8", - "path": "{LeftHand}/trigger", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Activate Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "97b8d82a-a074-44dc-9f09-54c295d456c6", - "path": "{LeftHand}/triggerPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "UI Press", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "8d385188-d5ce-4d6b-806d-94352d453f7d", - "path": "{LeftHand}/trigger", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "UI Press Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "2D Vector", - "id": "15a3fd40-639d-413c-81bf-9927fd0b7f77", - "path": "2DVector(mode=2)", - "interactions": "", - "processors": "StickDeadzone", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "ce11dfb6-f46b-4f02-82c5-8ec39c405733", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "dbbe3586-c7cf-4228-8400-daaf5c66b8fb", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "804e26bf-8032-447c-8885-c8ffbc09af13", - "path": "{LeftHand}/Primary2DAxis/x", - "interactions": "", - "processors": "Clamp(min=-1),Invert", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "b2aacbc4-1544-45e9-b334-78d52062a59a", - "path": "{LeftHand}/Primary2DAxis/x", - "interactions": "", - "processors": "Clamp(max=1)", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "2D Vector", - "id": "91e5f81f-1b07-493b-bd99-aec4cf481652", - "path": "2DVector(mode=2)", - "interactions": "", - "processors": "StickDeadzone", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "92c8f42a-f44a-43aa-8b3f-d5ae241c62c7", - "path": "{LeftHand}/Primary2DAxis/y", - "interactions": "", - "processors": "Clamp(max=1)", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "54a6b8d3-b502-47ba-ace2-62539f1be082", - "path": "{LeftHand}/Primary2DAxis/y", - "interactions": "", - "processors": "Clamp(min=-1),Invert", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "f4d109ac-6cc6-473f-86f0-d4fae6527dc4", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "75c78e86-6df8-4ab3-add9-634bc2e8361e", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, { "name": "", "id": "3441c045-6c6e-4d9b-b34c-6bdd221e8141", "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", - "action": "Grabbing", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "e7381de1-adb1-4ab0-9071-17a3213c4668", - "path": "{LeftHand}/gripPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false @@ -1167,7 +980,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -1178,7 +991,7 @@ "path": "{RightHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -1189,7 +1002,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -1200,7 +1013,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -1211,7 +1024,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -1222,7 +1035,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -1266,7 +1079,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1277,7 +1090,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1299,7 +1112,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1310,7 +1123,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1337,182 +1150,6 @@ "isComposite": false, "isPartOfComposite": true }, - { - "name": "2D Vector", - "id": "55fb77c4-b850-417c-9a01-c1ec1dff05fb", - "path": "2DVector(mode=2)", - "interactions": "", - "processors": "StickDeadzone", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "b020759e-5268-4bdd-8764-91da1e93fb6f", - "path": "{RightHand}/Primary2DAxis/y", - "interactions": "", - "processors": "Clamp(max=1)", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "9a2b0768-3a0a-4634-8f42-2d353b6db705", - "path": "{RightHand}/Primary2DAxis/y", - "interactions": "", - "processors": "Clamp(min=-1),Invert", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "ee22cf8a-620c-4b16-84cb-193ae9328a58", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "77a07047-8c70-4413-b0b2-8e39ffc54bd1", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Translate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "2D Vector", - "id": "9f8620f6-e9be-4c0c-a7ff-61c515c122a3", - "path": "2DVector(mode=2)", - "interactions": "", - "processors": "StickDeadzone", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": true, - "isPartOfComposite": false - }, - { - "name": "up", - "id": "f80faa08-3e57-4b52-ba8a-7058d8854302", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "down", - "id": "6186010c-a402-4b71-9658-5ed11993bd07", - "path": "", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "left", - "id": "07ae66e2-99e9-40d6-8349-e98efaf77b50", - "path": "{RightHand}/Primary2DAxis/x", - "interactions": "", - "processors": "Clamp(min=-1),Invert", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "right", - "id": "1e1a36b9-0165-46f1-b3fc-580cafc6e279", - "path": "{RightHand}/Primary2DAxis/x", - "interactions": "", - "processors": "Clamp(max=1)", - "groups": "Oculus", - "action": "Rotate Anchor", - "isComposite": false, - "isPartOfComposite": true - }, - { - "name": "", - "id": "19e24ed3-c74b-453c-94be-176bd846aa3a", - "path": "{RightHand}/trigger", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "UI Press Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "2efc5d7b-d734-48c0-a793-ffd4a3614d6e", - "path": "{RightHand}/triggerPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "UI Press", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "a435042a-5b2f-4245-b346-38acdabbdd70", - "path": "{RightHand}/trigger", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Activate Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "3066f0c4-53f0-49da-8141-52c1587b7acc", - "path": "{RightHand}/triggerPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Activate", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "4e727535-b27d-4550-a6fe-de3c52911893", - "path": "{RightHand}/grip", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Select Value", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "b30e56c7-8cd3-4462-a1f7-c689e1f62106", - "path": "{RightHand}/gripPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", - "action": "Select", - "isComposite": false, - "isPartOfComposite": false - }, { "name": "", "id": "7a31b9ef-3df6-41c9-a340-d0794019c200", @@ -1530,18 +1167,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", - "action": "Grabbing", - "isComposite": false, - "isPartOfComposite": false - }, - { - "name": "", - "id": "1d414e39-fdc6-457d-8a2f-c9a40ddab24f", - "path": "{RightHand}/gripPressed", - "interactions": "", - "processors": "", - "groups": "Oculus", + "groups": "Generic XR Controller;Vive;Oculus", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false From 279b92df7f8ca17cb29fc90b3f4abc824b3c26da Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 13:26:23 +0200 Subject: [PATCH 026/121] Renamed scheme Vive to Vive-OpenXR and Oculus to Oculus-OpenXR --- .../Common/Interaction/VR2Gather.inputactions | 230 +++++++++--------- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index e2248136a..327e7cfb2 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -40,7 +40,7 @@ "path": "/centerEyePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": false @@ -51,7 +51,7 @@ "path": "/centerEyeRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": false @@ -62,7 +62,7 @@ "path": "/isTracked", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -128,7 +128,7 @@ "path": "{LeftHand}/pointerRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -139,7 +139,7 @@ "path": "{LeftHand}/deviceRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -150,7 +150,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -172,7 +172,7 @@ "path": "{LeftHand}/pointerPosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -183,7 +183,7 @@ "path": "{LeftHand}/devicePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -194,7 +194,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -205,7 +205,7 @@ "path": "{LeftHand}/*", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Haptic Device", "isComposite": false, "isPartOfComposite": false @@ -216,7 +216,7 @@ "path": "{LeftHand}/trackingState", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -325,7 +325,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -336,7 +336,7 @@ "path": "{LeftHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -347,7 +347,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -358,7 +358,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -369,7 +369,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -380,7 +380,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -402,7 +402,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -413,7 +413,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -424,7 +424,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -435,7 +435,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -457,7 +457,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -468,7 +468,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -479,7 +479,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -490,7 +490,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -501,7 +501,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false @@ -512,7 +512,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -523,7 +523,7 @@ "path": "{LeftHand}/triggerTouched", "interactions": "", "processors": "Negate", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -587,7 +587,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "Sector(directions=-1,sweepBehavior=3)", "processors": "", - "groups": "Generic XR Controller;Oculus", + "groups": "Generic XR Controller;Oculus-OpenXR", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -598,7 +598,7 @@ "path": "{LeftHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -609,7 +609,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "Sector(directions=1,sweepBehavior=2,pressPoint=0.72)", "processors": "", - "groups": "Generic XR Controller;Oculus", + "groups": "Generic XR Controller;Oculus-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": false @@ -620,7 +620,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Teleport Mode Cancel", "isComposite": false, "isPartOfComposite": false @@ -631,7 +631,7 @@ "path": "{LeftHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller", "action": "Turn", "isComposite": false, "isPartOfComposite": false @@ -653,7 +653,7 @@ "path": "{LeftHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Turn", "isComposite": false, "isPartOfComposite": true @@ -664,7 +664,7 @@ "path": "{LeftHand}/trackpad", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Turn", "isComposite": false, "isPartOfComposite": true @@ -675,7 +675,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "", "processors": "StickDeadzone", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Move", "isComposite": false, "isPartOfComposite": false @@ -697,7 +697,7 @@ "path": "{LeftHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": true @@ -708,7 +708,7 @@ "path": "{LeftHand}/trackpad", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": true @@ -774,7 +774,7 @@ "path": "{RightHand}/pointerRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -785,7 +785,7 @@ "path": "{RightHand}/deviceRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -796,7 +796,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -818,7 +818,7 @@ "path": "{RightHand}/pointerPosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -829,7 +829,7 @@ "path": "{RightHand}/devicePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -840,7 +840,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -851,7 +851,7 @@ "path": "{RightHand}/*", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Haptic Device", "isComposite": false, "isPartOfComposite": false @@ -862,7 +862,7 @@ "path": "{RightHand}/trackingState", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -980,7 +980,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -991,7 +991,7 @@ "path": "{RightHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -1002,7 +1002,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -1013,7 +1013,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -1024,7 +1024,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -1035,7 +1035,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -1057,7 +1057,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1068,7 +1068,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1079,7 +1079,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1090,7 +1090,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1112,7 +1112,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1123,7 +1123,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1134,7 +1134,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1145,7 +1145,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1156,7 +1156,7 @@ "path": "{RightHand}/primarybutton", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "Secondary Activate", "isComposite": false, "isPartOfComposite": false @@ -1167,7 +1167,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive;Oculus", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false @@ -1178,7 +1178,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive", + "groups": "Generic XR Controller;Vive-OpenXR", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -1189,7 +1189,7 @@ "path": "{RightHand}/triggertouched", "interactions": "", "processors": "Negate", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -1253,7 +1253,7 @@ "path": "{RightHand}/Primary2DAxis", "interactions": "Sector(directions=-1,sweepBehavior=3)", "processors": "", - "groups": "Generic XR Controller;Oculus", + "groups": "Generic XR Controller;Oculus-OpenXR", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -1264,7 +1264,7 @@ "path": "{RightHand}/Primary2DAxis", "interactions": "Sector(directions=1,sweepBehavior=2,pressPoint=0.76)", "processors": "", - "groups": "Generic XR Controller;Oculus", + "groups": "Generic XR Controller;Oculus-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": false @@ -1275,7 +1275,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus;Vive", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Teleport Mode Cancel", "isComposite": false, "isPartOfComposite": false @@ -1286,7 +1286,7 @@ "path": "{RightHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller", "action": "Turn", "isComposite": false, "isPartOfComposite": false @@ -1308,7 +1308,7 @@ "path": "{RightHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Turn", "isComposite": false, "isPartOfComposite": true @@ -1319,7 +1319,7 @@ "path": "{RightHand}/trackpad", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Turn", "isComposite": false, "isPartOfComposite": true @@ -1330,7 +1330,7 @@ "path": "{RightHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -1352,7 +1352,7 @@ "path": "{RightHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": true @@ -1363,7 +1363,7 @@ "path": "{RightHand}/trackpad", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": true @@ -1994,7 +1994,7 @@ "path": "OneModifier", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": true, "isPartOfComposite": false @@ -2005,7 +2005,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2016,7 +2016,7 @@ "path": "{LeftHand}/thumbstick", "interactions": "", "processors": "ScaleVector2(x=5,y=5)", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2027,7 +2027,7 @@ "path": "OneModifier", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": true, "isPartOfComposite": false @@ -2038,7 +2038,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2049,7 +2049,7 @@ "path": "{LeftHand}/trackpad", "interactions": "", "processors": "ScaleVector2(x=5,y=5)", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2060,7 +2060,7 @@ "path": "OneModifier", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": true, "isPartOfComposite": false @@ -2071,7 +2071,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2082,7 +2082,7 @@ "path": "{RightHand}/thumbstick", "interactions": "", "processors": "ScaleVector2(x=5,y=5)", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2093,7 +2093,7 @@ "path": "OneModifier", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": true, "isPartOfComposite": false @@ -2104,7 +2104,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2115,7 +2115,7 @@ "path": "{RightHand}/trackpad", "interactions": "", "processors": "StickDeadzone(min=0.5,max=1)", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2137,7 +2137,7 @@ "path": "2DVector", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewHeight", "isComposite": true, "isPartOfComposite": false @@ -2214,7 +2214,7 @@ "path": "TwoModifiers", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": true, "isPartOfComposite": false @@ -2225,7 +2225,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2236,7 +2236,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2247,7 +2247,7 @@ "path": "{LeftHand}/thumbstickClicked", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2258,7 +2258,7 @@ "path": "TwoModifiers", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": true, "isPartOfComposite": false @@ -2269,7 +2269,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2280,7 +2280,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2291,7 +2291,7 @@ "path": "{LeftHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2302,7 +2302,7 @@ "path": "TwoModifiers", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": true, "isPartOfComposite": false @@ -2313,7 +2313,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2324,7 +2324,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2335,7 +2335,7 @@ "path": "{RightHand}/thumbstickClicked", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2346,7 +2346,7 @@ "path": "TwoModifiers", "interactions": "", "processors": "", - "groups": "Oculus", + "groups": "Oculus-OpenXR", "action": "ViewReset", "isComposite": true, "isPartOfComposite": false @@ -2357,7 +2357,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2368,7 +2368,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2379,7 +2379,7 @@ "path": "{RightHand}/trackpadClicked", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2429,7 +2429,7 @@ "path": "{LeftHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2440,7 +2440,7 @@ "path": "{RightHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2451,7 +2451,7 @@ "path": "{LeftHand}/menu", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2462,7 +2462,7 @@ "path": "{RightHand}/menu", "interactions": "", "processors": "", - "groups": "Vive", + "groups": "Vive-OpenXR", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2885,7 +2885,7 @@ "path": "*/{Submit}", "interactions": "", "processors": "", - "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus;Vive", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Submit", "isComposite": false, "isPartOfComposite": false @@ -2896,7 +2896,7 @@ "path": "*/{Cancel}", "interactions": "", "processors": "", - "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus;Vive", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Cancel", "isComposite": false, "isPartOfComposite": false @@ -2973,7 +2973,7 @@ "path": "/trigger", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus;Vive", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "Click", "isComposite": false, "isPartOfComposite": false @@ -3039,7 +3039,7 @@ "path": "/devicePosition", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus;Vive", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "TrackedDevicePosition", "isComposite": false, "isPartOfComposite": false @@ -3050,7 +3050,7 @@ "path": "/deviceRotation", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus;Vive", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", "action": "TrackedDeviceOrientation", "isComposite": false, "isPartOfComposite": false @@ -3086,8 +3086,8 @@ ] }, { - "name": "Oculus", - "bindingGroup": "Oculus", + "name": "Oculus-OpenXR", + "bindingGroup": "Oculus-OpenXR", "devices": [ { "devicePath": "", @@ -3107,8 +3107,8 @@ ] }, { - "name": "Vive", - "bindingGroup": "Vive", + "name": "Vive-OpenXR", + "bindingGroup": "Vive-OpenXR", "devices": [ { "devicePath": "", From 8648c7fac3974471527d5a9588f5bcc1153c1b1d Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 13:30:54 +0200 Subject: [PATCH 027/121] Emit warning if we have an unknown XR controller. --- Assets/Pilots/Common/Interaction/VRTInputController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Pilots/Common/Interaction/VRTInputController.cs b/Assets/Pilots/Common/Interaction/VRTInputController.cs index 90399f248..bd82ed5b4 100644 --- a/Assets/Pilots/Common/Interaction/VRTInputController.cs +++ b/Assets/Pilots/Common/Interaction/VRTInputController.cs @@ -111,7 +111,7 @@ ControllerType FindAttachedController() { Debug.Log($"VRTInputController: is Oculus Controller"); } - } + } else if (inDev.name.Contains("HTC Vive Controller")) { foundViveController = true; @@ -119,6 +119,9 @@ ControllerType FindAttachedController() { Debug.Log($"VRTInputController: is Vive controller"); } + } else + { + Debug.LogWarning($"VRTInputController: treat \"{inDev.name}\" as generic controller"); } } if (foundOculusController) return ControllerType.Oculus; From 55c23ed68199eae897a120d9725dd45502a78f8d Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 13:58:30 +0200 Subject: [PATCH 028/121] Added Oculus-Native control scheme. Everything works (on desktop) except for right hand pointing. Completely fail to understand why, left had is fine. For now use press trigger with right hand controller. --- .../Common/Interaction/VR2Gather.inputactions | 177 ++++++++++-------- 1 file changed, 99 insertions(+), 78 deletions(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index 327e7cfb2..c0544788f 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -40,7 +40,7 @@ "path": "/centerEyePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": false @@ -51,7 +51,7 @@ "path": "/centerEyeRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": false @@ -62,7 +62,7 @@ "path": "/isTracked", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -128,7 +128,7 @@ "path": "{LeftHand}/pointerRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -139,7 +139,7 @@ "path": "{LeftHand}/deviceRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -150,7 +150,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -172,7 +172,7 @@ "path": "{LeftHand}/pointerPosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -183,7 +183,7 @@ "path": "{LeftHand}/devicePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -194,7 +194,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -205,7 +205,7 @@ "path": "{LeftHand}/*", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Haptic Device", "isComposite": false, "isPartOfComposite": false @@ -216,7 +216,7 @@ "path": "{LeftHand}/trackingState", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -325,7 +325,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -336,7 +336,7 @@ "path": "{LeftHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -347,7 +347,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -358,7 +358,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -369,7 +369,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -380,7 +380,7 @@ "path": "{LeftHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -402,7 +402,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -413,7 +413,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -424,7 +424,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -435,7 +435,7 @@ "path": "{LeftHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -457,7 +457,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -468,7 +468,7 @@ "path": "{LeftHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -479,7 +479,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -490,7 +490,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -501,7 +501,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false @@ -523,7 +523,7 @@ "path": "{LeftHand}/triggerTouched", "interactions": "", "processors": "Negate", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -587,7 +587,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "Sector(directions=-1,sweepBehavior=3)", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Oculus-Native", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -609,7 +609,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "Sector(directions=1,sweepBehavior=2,pressPoint=0.72)", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Oculus-Native", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": false @@ -620,7 +620,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Teleport Mode Cancel", "isComposite": false, "isPartOfComposite": false @@ -631,7 +631,7 @@ "path": "{LeftHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus-OpenXR;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller;Oculus-Native", "action": "Turn", "isComposite": false, "isPartOfComposite": false @@ -675,7 +675,7 @@ "path": "{LeftHand}/Primary2DAxis", "interactions": "", "processors": "StickDeadzone", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Move", "isComposite": false, "isPartOfComposite": false @@ -774,7 +774,7 @@ "path": "{RightHand}/pointerRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -785,7 +785,7 @@ "path": "{RightHand}/deviceRotation", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -796,7 +796,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Rotation", "isComposite": false, "isPartOfComposite": true @@ -818,7 +818,7 @@ "path": "{RightHand}/pointerPosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -829,7 +829,7 @@ "path": "{RightHand}/devicePosition", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -840,7 +840,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Position", "isComposite": false, "isPartOfComposite": true @@ -851,7 +851,7 @@ "path": "{RightHand}/*", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Haptic Device", "isComposite": false, "isPartOfComposite": false @@ -862,7 +862,7 @@ "path": "{RightHand}/trackingState", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Tracking State", "isComposite": false, "isPartOfComposite": false @@ -980,7 +980,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Select", "isComposite": false, "isPartOfComposite": false @@ -991,7 +991,7 @@ "path": "{RightHand}/grip", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Select Value", "isComposite": false, "isPartOfComposite": false @@ -1002,7 +1002,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Activate", "isComposite": false, "isPartOfComposite": false @@ -1013,7 +1013,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Activate Value", "isComposite": false, "isPartOfComposite": false @@ -1024,7 +1024,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "UI Press", "isComposite": false, "isPartOfComposite": false @@ -1035,7 +1035,7 @@ "path": "{RightHand}/trigger", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "UI Press Value", "isComposite": false, "isPartOfComposite": false @@ -1057,7 +1057,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1068,7 +1068,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1079,7 +1079,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1090,7 +1090,7 @@ "path": "{RightHand}/Primary2DAxis/x", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Rotate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1112,7 +1112,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(max=1)", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1123,7 +1123,7 @@ "path": "{RightHand}/Primary2DAxis/y", "interactions": "", "processors": "Clamp(min=-1),Invert", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1134,7 +1134,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1145,7 +1145,7 @@ "path": "", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Translate Anchor", "isComposite": false, "isPartOfComposite": true @@ -1156,7 +1156,7 @@ "path": "{RightHand}/primarybutton", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "Secondary Activate", "isComposite": false, "isPartOfComposite": false @@ -1167,7 +1167,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR", + "groups": "Generic XR Controller;Vive-OpenXR;Oculus-OpenXR;Oculus-Native", "action": "Grabbing", "isComposite": false, "isPartOfComposite": false @@ -1189,7 +1189,7 @@ "path": "{RightHand}/triggertouched", "interactions": "", "processors": "Negate", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "Pointing", "isComposite": false, "isPartOfComposite": false @@ -1253,7 +1253,7 @@ "path": "{RightHand}/Primary2DAxis", "interactions": "Sector(directions=-1,sweepBehavior=3)", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Oculus-Native", "action": "Teleport Select", "isComposite": false, "isPartOfComposite": false @@ -1264,7 +1264,7 @@ "path": "{RightHand}/Primary2DAxis", "interactions": "Sector(directions=1,sweepBehavior=2,pressPoint=0.76)", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Oculus-Native", "action": "Teleport Mode Activate", "isComposite": false, "isPartOfComposite": false @@ -1275,7 +1275,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Teleport Mode Cancel", "isComposite": false, "isPartOfComposite": false @@ -1286,7 +1286,7 @@ "path": "{RightHand}/primary2DAxis", "interactions": "Sector(directions=12,sweepBehavior=1),Sector(directions=2,sweepBehavior=2)", "processors": "", - "groups": "Oculus-OpenXR;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller;Oculus-Native", "action": "Turn", "isComposite": false, "isPartOfComposite": false @@ -2005,7 +2005,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2016,7 +2016,7 @@ "path": "{LeftHand}/thumbstick", "interactions": "", "processors": "ScaleVector2(x=5,y=5)", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2071,7 +2071,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2082,7 +2082,7 @@ "path": "{RightHand}/thumbstick", "interactions": "", "processors": "ScaleVector2(x=5,y=5)", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewHeight", "isComposite": false, "isPartOfComposite": true @@ -2225,7 +2225,7 @@ "path": "{LeftHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2236,7 +2236,7 @@ "path": "{LeftHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2247,7 +2247,7 @@ "path": "{LeftHand}/thumbstickClicked", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2313,7 +2313,7 @@ "path": "{RightHand}/gripPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2324,7 +2324,7 @@ "path": "{RightHand}/triggerPressed", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2335,7 +2335,7 @@ "path": "{RightHand}/thumbstickClicked", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR", + "groups": "Oculus-OpenXR;Oculus-Native", "action": "ViewReset", "isComposite": false, "isPartOfComposite": true @@ -2429,7 +2429,7 @@ "path": "{LeftHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller;Oculus-Native", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2440,7 +2440,7 @@ "path": "{RightHand}/secondaryButton", "interactions": "", "processors": "", - "groups": "Oculus-OpenXR;Generic XR Controller", + "groups": "Oculus-OpenXR;Generic XR Controller;Oculus-Native", "action": "ShowHide", "isComposite": false, "isPartOfComposite": false @@ -2885,7 +2885,7 @@ "path": "*/{Submit}", "interactions": "", "processors": "", - "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Submit", "isComposite": false, "isPartOfComposite": false @@ -2896,7 +2896,7 @@ "path": "*/{Cancel}", "interactions": "", "processors": "", - "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "Keyboard&Mouse;Gamepad;Touch;Joystick;XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Cancel", "isComposite": false, "isPartOfComposite": false @@ -2973,7 +2973,7 @@ "path": "/trigger", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "Click", "isComposite": false, "isPartOfComposite": false @@ -3039,7 +3039,7 @@ "path": "/devicePosition", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "TrackedDevicePosition", "isComposite": false, "isPartOfComposite": false @@ -3050,7 +3050,7 @@ "path": "/deviceRotation", "interactions": "", "processors": "", - "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR", + "groups": "XR;Generic XR Controller;Oculus-OpenXR;Vive-OpenXR;Oculus-Native", "action": "TrackedDeviceOrientation", "isComposite": false, "isPartOfComposite": false @@ -3175,6 +3175,27 @@ "isOR": false } ] + }, + { + "name": "Oculus-Native", + "bindingGroup": "Oculus-Native", + "devices": [ + { + "devicePath": "", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "{LeftHand}", + "isOptional": false, + "isOR": false + }, + { + "devicePath": "{RightHand}", + "isOptional": false, + "isOR": false + } + ] } ] } \ No newline at end of file From 4f88e6b4299557e33c8b7091d56eaab8ef5d6577 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 16:58:22 +0200 Subject: [PATCH 029/121] Manually changing the path for the RH controller touched worked. Go figure. --- Assets/Pilots/Common/Interaction/VR2Gather.inputactions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index c0544788f..9cb829cc2 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -1186,7 +1186,7 @@ { "name": "", "id": "fea84b64-72bc-4d17-8941-59e59106bebf", - "path": "{RightHand}/triggertouched", + "path": "{RightHand}/triggerTouched", "interactions": "", "processors": "Negate", "groups": "Oculus-OpenXR;Oculus-Native", From 3308bc915f594d6627720f34643535593d7d9e57 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Wed, 2 Aug 2023 17:46:32 +0200 Subject: [PATCH 030/121] Various changes to try and make SoloPlayground work both standalone and when called from LoginManager. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 2 +- Assets/Pilots/Common/Networking/HandNetworkControllerSelf.cs | 4 ++-- Assets/Pilots/SoloPlayground/SoloPlayground.unity | 4 ++-- Assets/VRTCore/VRTConfig.cs | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index badb19f50..4dc56eac0 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -210,7 +210,7 @@ private void Awake() { if (instance == null) { instance = this; } else { - Debug.LogError($"OrchestratorController: attempt to create second instance from GameObject {gameObject.name}. First from {instance.gameObject.name}."); + Debug.LogWarning($"OrchestratorController: attempt to create second instance from GameObject {gameObject.name}. Keep first one, from {instance.gameObject.name}."); Destroy(gameObject); } } diff --git a/Assets/Pilots/Common/Networking/HandNetworkControllerSelf.cs b/Assets/Pilots/Common/Networking/HandNetworkControllerSelf.cs index 94d73d47e..894568701 100644 --- a/Assets/Pilots/Common/Networking/HandNetworkControllerSelf.cs +++ b/Assets/Pilots/Common/Networking/HandNetworkControllerSelf.cs @@ -23,7 +23,7 @@ public override VRTGrabbableController HeldGrabbable HandGrabEvent handGrabEvent = new HandGrabEvent() { GrabbableObjectId = m_HeldGrabbable.NetworkId, - UserId = _Player.UserId, + UserId = _Player?.UserId, Handedness = handHandedness, EventType = HandInteractionEventType.Release }; @@ -36,7 +36,7 @@ public override VRTGrabbableController HeldGrabbable HandGrabEvent handGrabEvent = new HandGrabEvent() { GrabbableObjectId = m_HeldGrabbable.NetworkId, - UserId = _Player.UserId, + UserId = _Player?.UserId, Handedness = handHandedness, EventType = HandInteractionEventType.Grab }; diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index d1e77cb26..984bd10ee 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd73a24b7583e89afa6d0e5e33468618c5e8ab61da412181329e91589c4e22da -size 143208 +oid sha256:4d0c46cf4bb3930687c440743707bb1d0809f64994ec712c9344894f99debbc0 +size 146379 diff --git a/Assets/VRTCore/VRTConfig.cs b/Assets/VRTCore/VRTConfig.cs index 23bbf5347..e32a924d4 100644 --- a/Assets/VRTCore/VRTConfig.cs +++ b/Assets/VRTCore/VRTConfig.cs @@ -196,7 +196,9 @@ private void Awake() { if (_Instance != null) { - Debug.LogError("VRTConfig: Awake() called but there is an Instance already. There must be only a single Component"); + Debug.LogWarning($"VRTConfig: Awake() called but there is an Instance already from {_Instance.gameObject}. Keeping the old one."); + Destroy(gameObject); + return; } Initialize(); } From 6d777530eae2ad6a0b3b35768813e9e73819e030 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 3 Aug 2023 16:25:12 +0200 Subject: [PATCH 031/121] Adding the pre-built libraries was a bad idea for development, because those libraries will be used in stead of the newly built ones. Removing them for now. --- Assets/ExternalAssets/VR2G-nativeLibraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ExternalAssets/VR2G-nativeLibraries b/Assets/ExternalAssets/VR2G-nativeLibraries index 5909fe522..b97a9b246 160000 --- a/Assets/ExternalAssets/VR2G-nativeLibraries +++ b/Assets/ExternalAssets/VR2G-nativeLibraries @@ -1 +1 @@ -Subproject commit 5909fe522ef4eccc00f86c2649ef824df626193c +Subproject commit b97a9b2465815d1314d76439f19095892c5c4a22 From 38b0cfe1c92d552a31f713ee770a97ad05864972 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 4 Aug 2023 17:59:15 +0200 Subject: [PATCH 032/121] Updated cwipc_unity version --- Packages/packages-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 52bff7fa2..7d875e498 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -183,7 +183,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "1afcc3d5c8e9c08ce20ca58b66283b4e15702ad0" + "hash": "852353469667d7283163c08f41a69a539efd22c4" }, "com.unity.modules.androidjni": { "version": "1.0.0", From 21ac584c18068de0a27f97d185ea41eca0b976d3 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 4 Aug 2023 22:59:57 +0200 Subject: [PATCH 033/121] Reverted OrchestratorController creation changes. Replaced by something half-way the previous situation. I think this should work for running SoloPlayground both standalone and from LoginManager. --- .../OrchestratorWrapping/OrchestratorController.cs | 13 +++++++------ Assets/Pilots/SoloPlayground/SoloPlayground.unity | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 4dc56eac0..1c596ca62 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -103,13 +103,14 @@ public enum orchestratorConnectionStatus { public static OrchestratorController Instance { get { if (instance is null) { - Debug.LogError("OrchestratorController.Instance called before Awake"); - //instance = new GameObject("OrchestratorController").AddComponent(); + Debug.Log("OrchestratorController.Instance: Creating GameObject"); + instance = new GameObject("OrchestratorController").AddComponent(); } return instance; } } + // Orchestrator Error Response Events public Action OnErrorEvent; @@ -204,12 +205,12 @@ public void StartRetrievingData() { #region Unity private void Awake() { - Debug.Log($"xxxjack OrchestratorController.Awake from {gameObject.name}"); - DontDestroyOnLoad(this); - + if (instance == null) { + Debug.Log($"xxxjack OrchestratorController.Awake from {gameObject.name}"); + DontDestroyOnLoad(this); instance = this; - } else { + } else if (instance != this) { Debug.LogWarning($"OrchestratorController: attempt to create second instance from GameObject {gameObject.name}. Keep first one, from {instance.gameObject.name}."); Destroy(gameObject); } diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index 984bd10ee..287df2094 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d0c46cf4bb3930687c440743707bb1d0809f64994ec712c9344894f99debbc0 -size 146379 +oid sha256:81076d752b13e028888c0d6c6579e6f4c4c153fc9df02cfef436ea249aaeded4 +size 144835 From 5104cae31c1e0f0448df324f9239bae64c85b563 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 4 Aug 2023 23:00:30 +0200 Subject: [PATCH 034/121] Upped InputSystem version. --- Packages/manifest.json | 2 +- Packages/packages-lock.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index b0fea3cb6..3ad8fa509 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,7 +2,7 @@ "dependencies": { "com.unity.animation.rigging": "1.1.1", "com.unity.ide.visualstudio": "2.0.18", - "com.unity.inputsystem": "1.6.1", + "com.unity.inputsystem": "1.6.3", "com.unity.postprocessing": "3.2.2", "com.unity.recorder": "3.0.3", "com.unity.textmeshpro": "3.0.6", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 7d875e498..aaf636383 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -36,7 +36,7 @@ "url": "https://packages.unity.com" }, "com.unity.inputsystem": { - "version": "1.6.1", + "version": "1.6.3", "depth": 0, "source": "registry", "dependencies": { From 37fea0f5d781758a402a2d292479af78f3d77d32 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 4 Aug 2023 23:01:57 +0200 Subject: [PATCH 035/121] Fed up with not getting my NegateProcessor loaded correctly. Getting rid of it. Replaced by a negate (true -> -true) and normalize ( -1..0 mapped to 0..1). --- .../Common/Interaction/InputAdditions.cs | 36 ------------------- .../Common/Interaction/InputAdditions.cs.meta | 11 ------ .../Common/Interaction/VR2Gather.inputactions | 10 +++--- 3 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 Assets/Pilots/Common/Interaction/InputAdditions.cs delete mode 100644 Assets/Pilots/Common/Interaction/InputAdditions.cs.meta diff --git a/Assets/Pilots/Common/Interaction/InputAdditions.cs b/Assets/Pilots/Common/Interaction/InputAdditions.cs deleted file mode 100644 index dca6aa9a4..000000000 --- a/Assets/Pilots/Common/Interaction/InputAdditions.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; -using UnityEngine.InputSystem; - - -// This InputProcessor should negate values, i.e. a range 0..1 will be mapped to 1..0. -// This is different from inverting (which maps -1..1 to 1..-1). -// But it doesn't work... -#if UNITY_EDITOR -[InitializeOnLoad] -#endif -public class NegateProcessor : InputProcessor -{ -#if UNITY_EDITOR - static NegateProcessor() - { - Initialize(); - } -#endif - - [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] - static void Initialize() - { - Debug.Log("NegateProcessor: registering with Input System"); - InputSystem.RegisterProcessor(); - } - - public override float Process(float value, InputControl control) - { - string name = "no control"; - if (control != null) name = control.name; - return 1 - value; - } -} diff --git a/Assets/Pilots/Common/Interaction/InputAdditions.cs.meta b/Assets/Pilots/Common/Interaction/InputAdditions.cs.meta deleted file mode 100644 index 02b980743..000000000 --- a/Assets/Pilots/Common/Interaction/InputAdditions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a28d7f9d04b4cfd4a826a7343c1a311d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions index 9cb829cc2..20c490cf2 100644 --- a/Assets/Pilots/Common/Interaction/VR2Gather.inputactions +++ b/Assets/Pilots/Common/Interaction/VR2Gather.inputactions @@ -265,7 +265,7 @@ }, { "name": "Pointing", - "type": "Value", + "type": "Button", "id": "9dbfcbef-5f5c-4126-b06a-ccbc37119afb", "expectedControlType": "Button", "processors": "", @@ -522,7 +522,7 @@ "id": "2bdc46d9-cadf-48b6-a318-be5de8c57d23", "path": "{LeftHand}/triggerTouched", "interactions": "", - "processors": "Negate", + "processors": "Scale(factor=-1),Normalize(min=-1,zero=-1)", "groups": "Oculus-OpenXR;Oculus-Native", "action": "Pointing", "isComposite": false, @@ -878,7 +878,7 @@ "type": "Button", "id": "ac96c10b-c955-4a46-8e67-bf16bc069b53", "expectedControlType": "Button", - "processors": "", + "processors": "Invert", "interactions": "", "initialStateCheck": false }, @@ -911,7 +911,7 @@ }, { "name": "Pointing", - "type": "Value", + "type": "Button", "id": "217d7354-1075-4b18-b591-2f0a66619739", "expectedControlType": "Button", "processors": "", @@ -1188,7 +1188,7 @@ "id": "fea84b64-72bc-4d17-8941-59e59106bebf", "path": "{RightHand}/triggerTouched", "interactions": "", - "processors": "Negate", + "processors": "Scale(factor=-1),Normalize(min=-1,zero=-1)", "groups": "Oculus-OpenXR;Oculus-Native", "action": "Pointing", "isComposite": false, From fc6630de7068da9aaf23e83d182f07c3332dab1b Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 7 Aug 2023 15:24:19 +0200 Subject: [PATCH 036/121] Upped cwipc_unity version to 0.15 --- Packages/packages-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index aaf636383..30fb576c1 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -183,7 +183,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "852353469667d7283163c08f41a69a539efd22c4" + "hash": "bfc08ef5f55398fe61724b2873f264415a57360b" }, "com.unity.modules.androidjni": { "version": "1.0.0", From ffa544d745e3233cf1eeaa99b236919ed3827cca Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Mon, 7 Aug 2023 23:40:26 +0200 Subject: [PATCH 037/121] Renamed serRepresentationType enums to more reasonable names. --- .../PilotControllerSoloExtensions.cs | 2 +- .../Common/Players/PlayerControllerBase.cs | 24 ++-- .../Common/Players/PlayerControllerSelf.cs | 2 +- .../Common/Players/SessionPlayersManager.cs | 6 +- .../LoginManager/Scripts/LoginController.cs | 2 +- .../LoginManager/Scripts/OrchestratorLogin.cs | 111 ++++++------------ .../Scripts/PointCloudPipelineOther.cs | 10 +- .../Scripts/PointCloudPipelineSelf.cs | 20 ++-- .../PointClouds/Scripts/PointcloudPlayback.cs | 2 +- .../WebCam/WebCamPipeline.cs | 4 +- Assets/VRTCore/UserRepresentationType.cs | 24 ++-- 11 files changed, 84 insertions(+), 123 deletions(-) diff --git a/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs b/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs index e53a7efff..24cd6cd23 100644 --- a/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs +++ b/Assets/Pilots/Common/Controllers/PilotControllerSoloExtensions.cs @@ -14,7 +14,7 @@ public class PilotControllerSoloExtensions : MonoBehaviour [Tooltip("The user (for setup camera position and input/output)")] public PlayerControllerSelf playerManager; [Tooltip("User representation")] - public UserRepresentationType userRepresentation = UserRepresentationType.__AVATAR__; + public UserRepresentationType userRepresentation = UserRepresentationType.SimpleAvatar; public void Start() { diff --git a/Assets/Pilots/Common/Players/PlayerControllerBase.cs b/Assets/Pilots/Common/Players/PlayerControllerBase.cs index fa558ee9d..fbc05c19c 100644 --- a/Assets/Pilots/Common/Players/PlayerControllerBase.cs +++ b/Assets/Pilots/Common/Players/PlayerControllerBase.cs @@ -97,7 +97,7 @@ protected void _SetupCommon(VRT.Orchestrator.Wrapping.User _user) SetRepresentation(user.userData.userRepresentationType); - if (user.userData.userRepresentationType != UserRepresentationType.__NONE__) + if (user.userData.userRepresentationType != UserRepresentationType.NoRepresentation) { isAudible = true; @@ -142,28 +142,28 @@ public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVi if (charControl != null) charControl.enabled = true; switch (userRepresentation) { - case UserRepresentationType.__NONE__: + case UserRepresentationType.NoRepresentation: // disable character controller. if (charControl != null) { charControl.enabled = false; } break; - case UserRepresentationType.__2D__: + case UserRepresentationType.VideoAvatar: isVisible = true; webcam.SetActive(true); BasePipeline wcPipeline = BasePipeline.AddPipelineComponent(webcam, userRepresentation, isLocalPlayer); wcPipeline?.Init(isLocalPlayer, user, userCfg, isPreviewPlayer); break; - case UserRepresentationType.__AVATAR__: + case UserRepresentationType.SimpleAvatar: isVisible = true; avatar.SetActive(true); break; - case UserRepresentationType.__PCC_SYNTH__: - case UserRepresentationType.__PCC_PRERECORDED__: - case UserRepresentationType.__PCC_CWIK4A_: - case UserRepresentationType.__PCC_PROXY__: - case UserRepresentationType.__PCC_CWI_: // PC + case UserRepresentationType.Old__PCC_SYNTH__: + case UserRepresentationType.Old__PCC_PRERECORDED__: + case UserRepresentationType.Old__PCC_CWIK4A_: + case UserRepresentationType.Old__PCC_PROXY__: + case UserRepresentationType.Old__PCC_CWI_: // PC isVisible = true; this.pointcloud.SetActive(true); @@ -175,18 +175,18 @@ public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVi catch (Exception e) { Debug.LogError($"Cannot set representation {userRepresentation}. Revert to avatar."); - userRepresentation = UserRepresentationType.__AVATAR__; + userRepresentation = UserRepresentationType.SimpleAvatar; avatar.SetActive(true); this.pointcloud.SetActive(false); Destroy(pcPipeline); throw; } break; - case UserRepresentationType.__ALT1__: + case UserRepresentationType.AppDefinedRepresentationOne: altRepOne.SetActive(true); isVisible = true; break; - case UserRepresentationType.__ALT2__: + case UserRepresentationType.AppDefinedRepresentationTwo: altRepTwo.SetActive(true); isVisible = true; break; diff --git a/Assets/Pilots/Common/Players/PlayerControllerSelf.cs b/Assets/Pilots/Common/Players/PlayerControllerSelf.cs index f3934d97f..a343cb4a7 100644 --- a/Assets/Pilots/Common/Players/PlayerControllerSelf.cs +++ b/Assets/Pilots/Common/Players/PlayerControllerSelf.cs @@ -192,7 +192,7 @@ private void ForceTrigger() { if (userRepresentation == user.userData.userRepresentationType) { - SetRepresentation(UserRepresentationType.__NONE__); + SetRepresentation(UserRepresentationType.NoRepresentation); } else { diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index 928bca235..be6a10a2b 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -154,11 +154,11 @@ public void InstantiatePlayers() var representationType = user.userData.userRepresentationType; switch(representationType) { - case UserRepresentationType.__NONE__: - case UserRepresentationType.__SPECTATOR__: + case UserRepresentationType.NoRepresentation: + case UserRepresentationType.AudioOnly: AddSpectator(networkPlayer); break; - case UserRepresentationType.__CAMERAMAN__: + case UserRepresentationType.NoRepresentationCamera: AddSpectator(networkPlayer); #if UNITY_EDITOR if (isLocalPlayer) diff --git a/Assets/Pilots/LoginManager/Scripts/LoginController.cs b/Assets/Pilots/LoginManager/Scripts/LoginController.cs index 3cca63ae1..855f00bba 100644 --- a/Assets/Pilots/LoginManager/Scripts/LoginController.cs +++ b/Assets/Pilots/LoginManager/Scripts/LoginController.cs @@ -29,7 +29,7 @@ public override void Start() userData = new Orchestrator.Wrapping.UserData() { microphoneName = "None", - userRepresentationType = UserRepresentationType.__AVATAR__ // xxxjack need correct one. + userRepresentationType = UserRepresentationType.SimpleAvatar // xxxjack need correct one. } }; selfPlayer.SetUpPlayerController(true, user); diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 3418a0a26..0a0032d66 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -243,37 +243,37 @@ private void AddUserComponentOnContent(Transform container, User user) // IMAGE switch (user.userData.userRepresentationType) { - case UserRepresentationType.__NONE__: + case UserRepresentationType.NoRepresentation: imageItem.sprite = Resources.Load("Icons/URNoneIcon"); textItem.text += " - (No Rep)"; break; - case UserRepresentationType.__2D__: + case UserRepresentationType.VideoAvatar: imageItem.sprite = Resources.Load("Icons/URCamIcon"); textItem.text += " - (2D Video)"; break; - case UserRepresentationType.__AVATAR__: + case UserRepresentationType.SimpleAvatar: imageItem.sprite = Resources.Load("Icons/URAvatarIcon"); textItem.text += " - (3D Avatar)"; break; - case UserRepresentationType.__PCC_CWI_: - case UserRepresentationType.__PCC_CWIK4A_: - case UserRepresentationType.__PCC_PROXY__: + case UserRepresentationType.Old__PCC_CWI_: + case UserRepresentationType.Old__PCC_CWIK4A_: + case UserRepresentationType.Old__PCC_PROXY__: imageItem.sprite = Resources.Load("Icons/URSingleIcon"); textItem.text += " - (Simple PC)"; break; - case UserRepresentationType.__PCC_SYNTH__: + case UserRepresentationType.Old__PCC_SYNTH__: imageItem.sprite = Resources.Load("Icons/URSingleIcon"); textItem.text += " - (Synthetic PC)"; break; - case UserRepresentationType.__PCC_PRERECORDED__: + case UserRepresentationType.Old__PCC_PRERECORDED__: imageItem.sprite = Resources.Load("Icons/URSingleIcon"); textItem.text += " - (Prerecorded PC)"; break; - case UserRepresentationType.__SPECTATOR__: + case UserRepresentationType.AudioOnly: imageItem.sprite = Resources.Load("Icons/URNoneIcon"); textItem.text += " - (Spectator)"; break; - case UserRepresentationType.__CAMERAMAN__: + case UserRepresentationType.NoRepresentationCamera: imageItem.sprite = Resources.Load("Icons/URCameramanIcon"); textItem.text += " - (Cameraman)"; break; @@ -377,51 +377,12 @@ private void UpdateScenarios(Dropdown dd) private void UpdateRepresentations(Dropdown dd) { // Fill UserData representation dropdown according to UserRepresentationType enum declaration + // xxxjack this has the huge disadvantage that they are numerically sorted. + // xxxjack and the order is difficult to change currently, because the values + // xxxjack are stored by the orchestrator in the user record, in numerical form... dd.ClearOptions(); - //dd.AddOptions(new List(Enum.GetNames(typeof(UserRepresentationType)))); - List finalNames = new List(); - foreach (string type in Enum.GetNames(typeof(UserRepresentationType))) - { - string enumName; - switch (type) - { - case "__NONE__": - enumName = "No Representation"; - break; - case "__2D__": - enumName = "Video Avatar"; - break; - case "__AVATAR__": - enumName = "Avatar"; - break; - case "__PCC_CWI_": - enumName = "PointCloud (RealSense)"; - break; - case "__PCC_CWIK4A_": - enumName = "PointCloud (Kinect)"; - break; - case "__PCC_PROXY__": - enumName = "PointCloud (5G phone)"; - break; - case "__PCC_SYNTH__": - enumName = "Synthetic PointCloud"; - break; - case "__PCC_PRERECORDED__": - enumName = "Prerecorded PointCloud"; - break; - case "__SPECTATOR__": - enumName = "Voice-only Spectator"; - break; - case "__CAMERAMAN__": - enumName = "Cameraman"; - break; - default: - enumName = type + " Not Defined"; - break; - } - finalNames.Add(enumName); - } - dd.AddOptions(finalNames); + dd.AddOptions(new List(Enum.GetNames(typeof(UserRepresentationType)))); + } private void UpdateWebcams(Dropdown dd) @@ -454,37 +415,37 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType // left change the icon 'userRepresentationLobbyImage' switch (_representationType) { - case UserRepresentationType.__NONE__: + case UserRepresentationType.NoRepresentation: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URNoneIcon"); userRepresentationLobbyText.text = "NO REPRESENTATION"; break; - case UserRepresentationType.__2D__: + case UserRepresentationType.VideoAvatar: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URCamIcon"); userRepresentationLobbyText.text = "VIDEO"; break; - case UserRepresentationType.__AVATAR__: + case UserRepresentationType.SimpleAvatar: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); userRepresentationLobbyText.text = "AVATAR"; break; - case UserRepresentationType.__PCC_CWI_: - case UserRepresentationType.__PCC_CWIK4A_: - case UserRepresentationType.__PCC_PROXY__: + case UserRepresentationType.Old__PCC_CWI_: + case UserRepresentationType.Old__PCC_CWIK4A_: + case UserRepresentationType.Old__PCC_PROXY__: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URSingleIcon"); userRepresentationLobbyText.text = "POINTCLOUD"; break; - case UserRepresentationType.__PCC_SYNTH__: + case UserRepresentationType.Old__PCC_SYNTH__: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); userRepresentationLobbyText.text = "SYNTHETIC PC"; break; - case UserRepresentationType.__PCC_PRERECORDED__: + case UserRepresentationType.Old__PCC_PRERECORDED__: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URSingleIcon"); userRepresentationLobbyText.text = "PRERECORDED PC"; break; - case UserRepresentationType.__SPECTATOR__: + case UserRepresentationType.AudioOnly: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URNoneIcon"); userRepresentationLobbyText.text = "SPECTATOR"; break; - case UserRepresentationType.__CAMERAMAN__: + case UserRepresentationType.NoRepresentationCamera: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URCameramanIcon"); userRepresentationLobbyText.text = "CAMERAMAN"; break; @@ -498,34 +459,34 @@ private void SetUserRepresentationDescription(UserRepresentationType _representa // left change the icon 'userRepresentationLobbyImage' switch (_representationType) { - case UserRepresentationType.__NONE__: + case UserRepresentationType.NoRepresentation: selfRepresentationDescription.text = "No representation, no audio. The user can only watch."; break; - case UserRepresentationType.__2D__: + case UserRepresentationType.VideoAvatar: selfRepresentationDescription.text = "Avatar with video window from your camera."; break; - case UserRepresentationType.__AVATAR__: + case UserRepresentationType.SimpleAvatar: selfRepresentationDescription.text = "3D Synthetic Avatar."; break; - case UserRepresentationType.__PCC_CWI_: + case UserRepresentationType.Old__PCC_CWI_: selfRepresentationDescription.text = "Realistic point cloud user representation, captured with RealSense cameras."; break; - case UserRepresentationType.__PCC_CWIK4A_: + case UserRepresentationType.Old__PCC_CWIK4A_: selfRepresentationDescription.text = "Realistic point cloud user representation, captured with Azure Kinect cameras."; break; - case UserRepresentationType.__PCC_PROXY__: + case UserRepresentationType.Old__PCC_PROXY__: selfRepresentationDescription.text = "Realistic point cloud user representation, captured with 5G phone camera."; break; - case UserRepresentationType.__PCC_SYNTH__: + case UserRepresentationType.Old__PCC_SYNTH__: selfRepresentationDescription.text = "3D Synthetic point cloud avatar."; break; - case UserRepresentationType.__PCC_PRERECORDED__: + case UserRepresentationType.Old__PCC_PRERECORDED__: selfRepresentationDescription.text = "3D Pre-recorded point cloud."; break; - case UserRepresentationType.__SPECTATOR__: + case UserRepresentationType.AudioOnly: selfRepresentationDescription.text = "No visual representation, only audio communication."; break; - case UserRepresentationType.__CAMERAMAN__: + case UserRepresentationType.NoRepresentationCamera: selfRepresentationDescription.text = "Local video recorder."; break; default: @@ -861,7 +822,7 @@ public void SelfRepresentationChanger() webcamInfoGO.SetActive(false); - if ((UserRepresentationType)representationTypeConfigDropdown.value == UserRepresentationType.__2D__) + if ((UserRepresentationType)representationTypeConfigDropdown.value == UserRepresentationType.VideoAvatar) { webcamInfoGO.SetActive(true); } diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs index bddd73ccf..932d34753 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs @@ -26,11 +26,11 @@ public class PointCloudPipelineOther : PointCloudPipelineBase public static void Register() { - RegisterPipelineClass(false, UserRepresentationType.__PCC_CWIK4A_, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.__PCC_CWI_, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.__PCC_PROXY__, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.__PCC_PRERECORDED__, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.__PCC_SYNTH__, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.Old__PCC_CWI_, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); } private static BasePipeline AddPipelineComponent(GameObject dst, UserRepresentationType i) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs index 690e8579f..e1a64e3c4 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs @@ -22,11 +22,11 @@ public class PointCloudPipelineSelf : PointCloudPipelineBase, IPointCloudPositio { public static void Register() { - RegisterPipelineClass(true, UserRepresentationType.__PCC_CWIK4A_, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.__PCC_CWI_, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.__PCC_PROXY__, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.__PCC_PRERECORDED__, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.__PCC_SYNTH__, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.Old__PCC_CWI_, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); } protected static BasePipeline AddPipelineComponent(GameObject dst, UserRepresentationType i) @@ -127,28 +127,28 @@ protected void _InitForSelfUser(VRTConfig._User._PCSelfConfig PCSelfConfig, bool // switch (user.userData.userRepresentationType) { - case UserRepresentationType.__PCC_CWI_: + case UserRepresentationType.Old__PCC_CWI_: var RS2ReaderConfig = PCSelfConfig.RS2ReaderConfig; if (RS2ReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.RS2ReaderConfig config"); pcReader = new AsyncRealsenseReader(RS2ReaderConfig.configFilename, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; - case UserRepresentationType.__PCC_CWIK4A_: + case UserRepresentationType.Old__PCC_CWIK4A_: var KinectReaderConfig = PCSelfConfig.RS2ReaderConfig; // Note: config shared with rs2 if (KinectReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.RS2ReaderConfig config"); pcReader = new AsyncKinectReader(KinectReaderConfig.configFilename, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; - case UserRepresentationType.__PCC_PROXY__: + case UserRepresentationType.Old__PCC_PROXY__: var ProxyReaderConfig = PCSelfConfig.ProxyReaderConfig; if (ProxyReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.ProxyReaderConfig config"); pcReader = new ProxyReader(ProxyReaderConfig.localIP, ProxyReaderConfig.port, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; - case UserRepresentationType.__PCC_SYNTH__: + case UserRepresentationType.Old__PCC_SYNTH__: int nPoints = 0; var SynthReaderConfig = PCSelfConfig.SynthReaderConfig; if (SynthReaderConfig != null) nPoints = SynthReaderConfig.nPoints; pcReader = new AsyncSyntheticReader(PCSelfConfig.frameRate, nPoints, selfPreparerQueue, encoderQueue); break; - case UserRepresentationType.__PCC_PRERECORDED__: + case UserRepresentationType.Old__PCC_PRERECORDED__: var prConfig = PCSelfConfig.PrerecordedReaderConfig; if (prConfig.folder == null || prConfig.folder == "") { diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs index 13b037be7..a78484017 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs @@ -127,7 +127,7 @@ public void Awake() dummyUser = new User(); dummyUser.userData = new UserData(); - dummyUser.userData.userRepresentationType = UserRepresentationType.__PCC_PRERECORDED__; + dummyUser.userData.userRepresentationType = UserRepresentationType.Old__PCC_PRERECORDED__; VRTConfig._User realUser = VRTConfig.Instance.LocalUser; diff --git a/Assets/UserRepresentation/WebCam/WebCamPipeline.cs b/Assets/UserRepresentation/WebCam/WebCamPipeline.cs index f8362e950..ce14f5434 100644 --- a/Assets/UserRepresentation/WebCam/WebCamPipeline.cs +++ b/Assets/UserRepresentation/WebCam/WebCamPipeline.cs @@ -44,8 +44,8 @@ public class WebCamPipeline : BasePipeline public static void Register() { - RegisterPipelineClass(true, UserRepresentationType.__2D__, AddWebCamPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.__2D__, AddWebCamPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.VideoAvatar, AddWebCamPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.VideoAvatar, AddWebCamPipelineComponent); } public static BasePipeline AddWebCamPipelineComponent(GameObject dst, UserRepresentationType i) diff --git a/Assets/VRTCore/UserRepresentationType.cs b/Assets/VRTCore/UserRepresentationType.cs index 781796899..4bc90211e 100644 --- a/Assets/VRTCore/UserRepresentationType.cs +++ b/Assets/VRTCore/UserRepresentationType.cs @@ -8,50 +8,50 @@ public enum UserRepresentationType /// /// No representation, spectator/listener only. /// - __NONE__, + NoRepresentation, /// /// 2D video (WebCam) stream, usually shown as an avatar with a screen. /// - __2D__, + VideoAvatar, /// /// Default avatar. /// - __AVATAR__, + SimpleAvatar, /// /// Point cloud (from Realsense camera) /// - __PCC_CWI_, + Old__PCC_CWI_, /// /// Point cloud (from Kinect camera) /// - __PCC_CWIK4A_, + Old__PCC_CWIK4A_, /// /// Point cloud (from remote RGBD camera via proxy) /// - __PCC_PROXY__, + Old__PCC_PROXY__, /// /// Synthetic point cloud /// - __PCC_SYNTH__, + Old__PCC_SYNTH__, /// /// Prerecorded point cloud /// - __PCC_PRERECORDED__, + Old__PCC_PRERECORDED__, /// /// User without visual representation but with audio feed /// - __SPECTATOR__, + AudioOnly, /// /// Special spectator that records view (possibly retransmitting as a web video feed) /// - __CAMERAMAN__, + NoRepresentationCamera, /// /// Application-defined alternative representation /// - __ALT1__, + AppDefinedRepresentationOne, /// /// Application-defined alternative representation /// - __ALT2__ + AppDefinedRepresentationTwo } } \ No newline at end of file From f67fc7034bb684d20d5f97076d8f67d57d31caa7 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Mon, 7 Aug 2023 23:58:09 +0200 Subject: [PATCH 038/121] Cleanup after the renaming. --- .../Common/Players/PlayerControllerBase.cs | 4 +++- .../LoginManager/Scripts/OrchestratorLogin.cs | 23 ++++--------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Assets/Pilots/Common/Players/PlayerControllerBase.cs b/Assets/Pilots/Common/Players/PlayerControllerBase.cs index fbc05c19c..7be7cd9aa 100644 --- a/Assets/Pilots/Common/Players/PlayerControllerBase.cs +++ b/Assets/Pilots/Common/Players/PlayerControllerBase.cs @@ -96,7 +96,8 @@ protected void _SetupCommon(VRT.Orchestrator.Wrapping.User _user) SetRepresentation(user.userData.userRepresentationType); - + // xxxjack Don't like this special case here: it means that everyone except + // NoRepresentation has audio (including the caermaman) if (user.userData.userRepresentationType != UserRepresentationType.NoRepresentation) { isAudible = true; @@ -191,6 +192,7 @@ public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVi isVisible = true; break; default: + Debug.LogError($"{Name()}: Unknown UserRepresentationType {userRepresentation}"); isVisible = false; break; } diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 0a0032d66..738e01654 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -278,6 +278,7 @@ private void AddUserComponentOnContent(Transform container, User user) textItem.text += " - (Cameraman)"; break; default: + Debug.LogError($"OrchestratorLogin: Unknown UserRepresentationType {user.userData.userRepresentationType}"); break; } } @@ -416,41 +417,26 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType switch (_representationType) { case UserRepresentationType.NoRepresentation: + case UserRepresentationType.AudioOnly: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URNoneIcon"); - userRepresentationLobbyText.text = "NO REPRESENTATION"; break; case UserRepresentationType.VideoAvatar: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URCamIcon"); - userRepresentationLobbyText.text = "VIDEO"; break; case UserRepresentationType.SimpleAvatar: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); - userRepresentationLobbyText.text = "AVATAR"; break; case UserRepresentationType.Old__PCC_CWI_: case UserRepresentationType.Old__PCC_CWIK4A_: case UserRepresentationType.Old__PCC_PROXY__: - userRepresentationLobbyImage.sprite = Resources.Load("Icons/URSingleIcon"); - userRepresentationLobbyText.text = "POINTCLOUD"; - break; case UserRepresentationType.Old__PCC_SYNTH__: - userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); - userRepresentationLobbyText.text = "SYNTHETIC PC"; - break; case UserRepresentationType.Old__PCC_PRERECORDED__: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URSingleIcon"); - userRepresentationLobbyText.text = "PRERECORDED PC"; break; - case UserRepresentationType.AudioOnly: - userRepresentationLobbyImage.sprite = Resources.Load("Icons/URNoneIcon"); - userRepresentationLobbyText.text = "SPECTATOR"; - break; - case UserRepresentationType.NoRepresentationCamera: + case UserRepresentationType.NoRepresentationCamera: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URCameramanIcon"); - userRepresentationLobbyText.text = "CAMERAMAN"; - break; - default: break; + } } @@ -490,6 +476,7 @@ private void SetUserRepresentationDescription(UserRepresentationType _representa selfRepresentationDescription.text = "Local video recorder."; break; default: + Debug.LogError($"OrchestratorLogin: Unknown UserRepresentationType {_representationType}"); break; } } From 4ff37ee853164099cec3adbab8683f75407c410f Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 10:37:11 +0200 Subject: [PATCH 039/121] Switch to Jack's home orchestrator for debugging. --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index c3867bc25..d404874a6 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "_unused_orchestratorURL" : "http://www.jackjansen.nl:8080/socket.io/", + "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "-", "_unused_AutoStart" : { "autoLogin" : true, From 3c049392478adc48cc952b169d1288f646bf4355 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 11:23:35 +0200 Subject: [PATCH 040/121] Getting started on config changes for unifying PC formats. --- .../Scripts/PointCloudPipelineSelf.cs | 8 ++-- Assets/VRTCore/VRTConfig.cs | 37 ++++++++++++++++++- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs index e1a64e3c4..1f71fb395 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs @@ -128,13 +128,13 @@ protected void _InitForSelfUser(VRTConfig._User._PCSelfConfig PCSelfConfig, bool switch (user.userData.userRepresentationType) { case UserRepresentationType.Old__PCC_CWI_: - var RS2ReaderConfig = PCSelfConfig.RS2ReaderConfig; - if (RS2ReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.RS2ReaderConfig config"); + var RS2ReaderConfig = PCSelfConfig.CameraReaderConfig; + if (RS2ReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.CameraReaderConfig config"); pcReader = new AsyncRealsenseReader(RS2ReaderConfig.configFilename, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; case UserRepresentationType.Old__PCC_CWIK4A_: - var KinectReaderConfig = PCSelfConfig.RS2ReaderConfig; // Note: config shared with rs2 - if (KinectReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.RS2ReaderConfig config"); + var KinectReaderConfig = PCSelfConfig.CameraReaderConfig; // Note: config shared with rs2 + if (KinectReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.CameraReaderConfig config"); pcReader = new AsyncKinectReader(KinectReaderConfig.configFilename, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; case UserRepresentationType.Old__PCC_PROXY__: diff --git a/Assets/VRTCore/VRTConfig.cs b/Assets/VRTCore/VRTConfig.cs index e32a924d4..18a7d10af 100644 --- a/Assets/VRTCore/VRTConfig.cs +++ b/Assets/VRTCore/VRTConfig.cs @@ -126,11 +126,32 @@ public class _User public class _PCSelfConfig { [Serializable] - public class _RS2ReaderConfig + public enum PCCapturerType + { + auto, + none, + realsense, + kinect, + synthetic, + remote, + proxy, + prerecorded + }; + public PCCapturerType capturerType; + [Tooltip("Override capturerType by name")] + public string capturerTypeName; + [Serializable] + public class _CameraReaderConfig { public string configFilename; } - public _RS2ReaderConfig RS2ReaderConfig; + public _CameraReaderConfig CameraReaderConfig; + [Serializable] + public class _RemoteCameraReaderConfig + { + public string url; + } + public _RemoteCameraReaderConfig RemoteCameraReaderConfig; [Serializable] public class _ProxyReaderConfig { @@ -216,11 +237,21 @@ private void Initialize() { Debug.LogWarning($"VRTConfig: override file not found: {file}"); } + // + // Update various settings after reading configfile overrides + // if (targetFrameRate != 0) { Application.targetFrameRate = this.targetFrameRate; Debug.LogWarning($"VRTCore.Config: Application.targetFrameRate set to {Application.targetFrameRate}"); } + if (LocalUser.PCSelfConfig.capturerTypeName != null && LocalUser.PCSelfConfig.capturerTypeName != "") { + if (!Enum.TryParse(LocalUser.PCSelfConfig.capturerTypeName, out LocalUser.PCSelfConfig.capturerType)) + { + Debug.LogError($"VRTCore.Config: Unknown capturerTypeName \"{LocalUser.PCSelfConfig.capturerTypeName}\""); + LocalUser.PCSelfConfig.capturerType = _User._PCSelfConfig.PCCapturerType.none; + } + } // Initialize some other modules that have their own configuration. #if VRT_WITH_STATS Statistics.Initialize(this.statsInterval, this.statsOutputFile, this.statsOutputFileAppend); @@ -230,6 +261,7 @@ private void Initialize() DontDestroyOnLoad(this.gameObject); } +#if xxxjack_unused public void WriteConfig(object toJson) { string file = ConfigFilename(); @@ -237,6 +269,7 @@ public void WriteConfig(object toJson) //System.IO.File.WriteAllText(Application.streamingAssetsPath + "/ipScalable.json", JsonHelper.ToJson(playerConfig, true)); } +#endif static string _ConfigFilenameFromCommandLineArgs() { From a9fdc6a2993d368df5279915882d73c52b37a4aa Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 12:14:17 +0200 Subject: [PATCH 041/121] Implemented generic point cloud capturer factory. --- .../Common/Players/PlayerControllerBase.cs | 2 +- .../LoginManager/Scenes/LoginManager.unity | 4 +- .../LoginManager/Scripts/OrchestratorLogin.cs | 6 +-- .../SoloPlayground/SoloPlayground.unity | 4 +- .../Scripts/PointCloudCapturerFactory.cs | 46 +++++++++++++++++++ .../Scripts/PointCloudCapturerFactory.cs.meta | 11 +++++ .../Scripts/PointCloudPipelineOther.cs | 2 +- .../Scripts/PointCloudPipelineSelf.cs | 9 ++-- Assets/VRTCore/UserRepresentationType.cs | 4 +- 9 files changed, 73 insertions(+), 15 deletions(-) create mode 100644 Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs create mode 100644 Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs.meta diff --git a/Assets/Pilots/Common/Players/PlayerControllerBase.cs b/Assets/Pilots/Common/Players/PlayerControllerBase.cs index 7be7cd9aa..1a188bf0e 100644 --- a/Assets/Pilots/Common/Players/PlayerControllerBase.cs +++ b/Assets/Pilots/Common/Players/PlayerControllerBase.cs @@ -164,7 +164,7 @@ public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVi case UserRepresentationType.Old__PCC_PRERECORDED__: case UserRepresentationType.Old__PCC_CWIK4A_: case UserRepresentationType.Old__PCC_PROXY__: - case UserRepresentationType.Old__PCC_CWI_: // PC + case UserRepresentationType.PointCloud: // PC isVisible = true; this.pointcloud.SetActive(true); diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 03779e322..092776d51 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e14ee37567c89704d6fbaea59e60307558b09b152016106d68df76791d005b29 -size 48968 +oid sha256:df35d0450d80f4f32e832cda20f44e1e41725387cbb1b70e0c8b7d3a5146f1f0 +size 49045 diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 738e01654..0a8d1d8d2 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -255,7 +255,7 @@ private void AddUserComponentOnContent(Transform container, User user) imageItem.sprite = Resources.Load("Icons/URAvatarIcon"); textItem.text += " - (3D Avatar)"; break; - case UserRepresentationType.Old__PCC_CWI_: + case UserRepresentationType.PointCloud: case UserRepresentationType.Old__PCC_CWIK4A_: case UserRepresentationType.Old__PCC_PROXY__: imageItem.sprite = Resources.Load("Icons/URSingleIcon"); @@ -426,7 +426,7 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType case UserRepresentationType.SimpleAvatar: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); break; - case UserRepresentationType.Old__PCC_CWI_: + case UserRepresentationType.PointCloud: case UserRepresentationType.Old__PCC_CWIK4A_: case UserRepresentationType.Old__PCC_PROXY__: case UserRepresentationType.Old__PCC_SYNTH__: @@ -454,7 +454,7 @@ private void SetUserRepresentationDescription(UserRepresentationType _representa case UserRepresentationType.SimpleAvatar: selfRepresentationDescription.text = "3D Synthetic Avatar."; break; - case UserRepresentationType.Old__PCC_CWI_: + case UserRepresentationType.PointCloud: selfRepresentationDescription.text = "Realistic point cloud user representation, captured with RealSense cameras."; break; case UserRepresentationType.Old__PCC_CWIK4A_: diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index 287df2094..9ef4a0307 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81076d752b13e028888c0d6c6579e6f4c4c153fc9df02cfef436ea249aaeded4 -size 144835 +oid sha256:6cf7e6dfa34cc5e0f5220b35fd67a00592cb636fa6470b0122af0cc1dc6ee73d +size 145042 diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs new file mode 100644 index 000000000..02054b6f2 --- /dev/null +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs @@ -0,0 +1,46 @@ +using Cwipc; +using VRT.Core; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using static VRT.Core.VRTConfig._User; +using static VRT.Core.VRTConfig._User._PCSelfConfig; + + +namespace VRT.UserRepresentation.PointCloud +{ + public class PointCloudCapturerFactory + { + public static AsyncPointCloudReader Create(VRTConfig._User._PCSelfConfig config, QueueThreadSafe selfPreparerQueue, QueueThreadSafe encoderQueue) { + switch(config.capturerType) + { +#if xxxjack_notyet + case VRTConfig._User._PCSelfConfig.PCCapturerType.auto: + return null; +#endif + case VRTConfig._User._PCSelfConfig.PCCapturerType.synthetic: + return new AsyncSyntheticReader(config.frameRate, config.SynthReaderConfig.nPoints, selfPreparerQueue, encoderQueue); + case VRTConfig._User._PCSelfConfig.PCCapturerType.kinect: + return new AsyncKinectReader(config.CameraReaderConfig.configFilename, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); + case VRTConfig._User._PCSelfConfig.PCCapturerType.realsense: + return new AsyncRealsenseReader(config.CameraReaderConfig.configFilename, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); + case VRTConfig._User._PCSelfConfig.PCCapturerType.prerecorded: + var prConfig = config.PrerecordedReaderConfig; + if (prConfig.folder == null || prConfig.folder == "") + { + throw new System.Exception($"PointCloudCapturerFactory: missing self-user PCSelfConfig.PrerecordedReaderConfig.folder config"); + } + return new AsyncPrerecordedReader(prConfig.folder, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); + case VRTConfig._User._PCSelfConfig.PCCapturerType.proxy: + var ProxyReaderConfig = config.ProxyReaderConfig; + return new ProxyReader(ProxyReaderConfig.localIP, ProxyReaderConfig.port, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); +#if xxxjack_notyet + case VRTConfig._User._PCSelfConfig.PCCapturerType.remote: + return null; +#endif + default: + throw new System.Exception($"PointCloudCapturerFactory: bad capturerType {config.capturerType}"); + } + } + } +} diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs.meta b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs.meta new file mode 100644 index 000000000..b5c01a99c --- /dev/null +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b0f99e8a52600b4d80d22d8ab8c9c50 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs index 932d34753..382738186 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs @@ -27,7 +27,7 @@ public class PointCloudPipelineOther : PointCloudPipelineBase public static void Register() { RegisterPipelineClass(false, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.Old__PCC_CWI_, AddPipelineComponent); + RegisterPipelineClass(false, UserRepresentationType.PointCloud, AddPipelineComponent); RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); RegisterPipelineClass(false, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs index 1f71fb395..9daeda58c 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs @@ -23,7 +23,7 @@ public class PointCloudPipelineSelf : PointCloudPipelineBase, IPointCloudPositio public static void Register() { RegisterPipelineClass(true, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.Old__PCC_CWI_, AddPipelineComponent); + RegisterPipelineClass(true, UserRepresentationType.PointCloud, AddPipelineComponent); RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); RegisterPipelineClass(true, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); @@ -125,13 +125,13 @@ protected void _InitForSelfUser(VRTConfig._User._PCSelfConfig PCSelfConfig, bool // // Create reader // + pcReader = PointCloudCapturerFactory.Create(PCSelfConfig, selfPreparerQueue, encoderQueue); +#if xxxjack_old switch (user.userData.userRepresentationType) { case UserRepresentationType.Old__PCC_CWI_: - var RS2ReaderConfig = PCSelfConfig.CameraReaderConfig; - if (RS2ReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.CameraReaderConfig config"); - pcReader = new AsyncRealsenseReader(RS2ReaderConfig.configFilename, PCSelfConfig.voxelSize, PCSelfConfig.frameRate, selfPreparerQueue, encoderQueue); break; + case UserRepresentationType.Old__PCC_CWIK4A_: var KinectReaderConfig = PCSelfConfig.CameraReaderConfig; // Note: config shared with rs2 if (KinectReaderConfig == null) throw new System.Exception($"{Name()}: missing self-user PCSelfConfig.CameraReaderConfig config"); @@ -160,6 +160,7 @@ protected void _InitForSelfUser(VRTConfig._User._PCSelfConfig PCSelfConfig, bool throw new System.Exception($"{Name()}: Unknown representation {user.userData.userRepresentationType}"); } +#endif reader = pcReader; diff --git a/Assets/VRTCore/UserRepresentationType.cs b/Assets/VRTCore/UserRepresentationType.cs index 4bc90211e..082c6c883 100644 --- a/Assets/VRTCore/UserRepresentationType.cs +++ b/Assets/VRTCore/UserRepresentationType.cs @@ -18,9 +18,9 @@ public enum UserRepresentationType /// SimpleAvatar, /// - /// Point cloud (from Realsense camera) + /// Point cloud. /// - Old__PCC_CWI_, + PointCloud, /// /// Point cloud (from Kinect camera) /// From e3530dfab8e0b3b7f2311c108f084e82212f18c5 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 17:31:13 +0200 Subject: [PATCH 042/121] Updated cwipc_unity --- Packages/packages-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 30fb576c1..1f486abaf 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -183,7 +183,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "bfc08ef5f55398fe61724b2873f264415a57360b" + "hash": "693b3baf13f488e6bedbe8e123f7aecac61b4ae4" }, "com.unity.modules.androidjni": { "version": "1.0.0", From 24f709ae1b937286f971f243fc2660fed915b9e5 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 17:31:53 +0200 Subject: [PATCH 043/121] Added autoreader and networked reader. --- .../PointClouds/Scripts/PointCloudCapturerFactory.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs index 02054b6f2..647ac9bb5 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs @@ -14,10 +14,8 @@ public class PointCloudCapturerFactory public static AsyncPointCloudReader Create(VRTConfig._User._PCSelfConfig config, QueueThreadSafe selfPreparerQueue, QueueThreadSafe encoderQueue) { switch(config.capturerType) { -#if xxxjack_notyet case VRTConfig._User._PCSelfConfig.PCCapturerType.auto: - return null; -#endif + return new AsyncAutoReader(config.CameraReaderConfig.configFilename, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); case VRTConfig._User._PCSelfConfig.PCCapturerType.synthetic: return new AsyncSyntheticReader(config.frameRate, config.SynthReaderConfig.nPoints, selfPreparerQueue, encoderQueue); case VRTConfig._User._PCSelfConfig.PCCapturerType.kinect: @@ -34,11 +32,10 @@ public static AsyncPointCloudReader Create(VRTConfig._User._PCSelfConfig config, case VRTConfig._User._PCSelfConfig.PCCapturerType.proxy: var ProxyReaderConfig = config.ProxyReaderConfig; return new ProxyReader(ProxyReaderConfig.localIP, ProxyReaderConfig.port, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); -#if xxxjack_notyet case VRTConfig._User._PCSelfConfig.PCCapturerType.remote: - return null; -#endif - default: + var rcConfig = config.RemoteCameraReaderConfig; + return new AsyncNetworkCaptureReader(rcConfig.url, rcConfig.isCompressed, selfPreparerQueue, encoderQueue); + default: throw new System.Exception($"PointCloudCapturerFactory: bad capturerType {config.capturerType}"); } } From 43d8f07d5a48414e81498a60d6e9a8319adb3c2a Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 17:32:49 +0200 Subject: [PATCH 044/121] Implementation pretty much finished. Closes #106. --- .../Common/Players/PlayerControllerBase.cs | 15 +++-- .../LoginManager/Scripts/OrchestratorLogin.cs | 67 ++++++++++--------- .../Scripts/PointCloudPipelineOther.cs | 4 -- .../Scripts/PointCloudPipelineSelf.cs | 4 -- .../PointClouds/Scripts/PointcloudPlayback.cs | 3 +- Assets/VRTCore/UserRepresentationType.cs | 8 +-- Assets/VRTCore/VRTConfig.cs | 1 + 7 files changed, 55 insertions(+), 47 deletions(-) diff --git a/Assets/Pilots/Common/Players/PlayerControllerBase.cs b/Assets/Pilots/Common/Players/PlayerControllerBase.cs index 1a188bf0e..7fa49dea9 100644 --- a/Assets/Pilots/Common/Players/PlayerControllerBase.cs +++ b/Assets/Pilots/Common/Players/PlayerControllerBase.cs @@ -119,6 +119,17 @@ protected void _SetupCommon(VRT.Orchestrator.Wrapping.User _user) public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVisible = false, bool permanent = false) { + switch(type) + { + case UserRepresentationType.Deprecated__PCC_SYNTH__: + case UserRepresentationType.Deprecated__PCC_PRERECORDED__: + case UserRepresentationType.Deprecated__PCC_CWIK4A_: + case UserRepresentationType.Deprecated__PCC_PROXY__: + Debug.LogWarning($"{Name()}: Deprecated type {type} changed to PointCloud"); + type = UserRepresentationType.PointCloud; + break; + + } if (isInitialized && type == userRepresentation) return; if (isInitialized && onlyIfVisible && !isVisible) return; isInitialized = true; @@ -160,10 +171,6 @@ public virtual void SetRepresentation(UserRepresentationType type, bool onlyIfVi isVisible = true; avatar.SetActive(true); break; - case UserRepresentationType.Old__PCC_SYNTH__: - case UserRepresentationType.Old__PCC_PRERECORDED__: - case UserRepresentationType.Old__PCC_CWIK4A_: - case UserRepresentationType.Old__PCC_PROXY__: case UserRepresentationType.PointCloud: // PC isVisible = true; this.pointcloud.SetActive(true); diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 0a8d1d8d2..f3dfd426b 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -242,6 +242,17 @@ private void AddUserComponentOnContent(Transform container, User user) rectImage.localScale = Vector3.one; // IMAGE switch (user.userData.userRepresentationType) + { + case UserRepresentationType.Deprecated__PCC_SYNTH__: + case UserRepresentationType.Deprecated__PCC_PRERECORDED__: + case UserRepresentationType.Deprecated__PCC_CWIK4A_: + case UserRepresentationType.Deprecated__PCC_PROXY__: + Debug.LogWarning($"OrchestratorLogin: Deprecated type {user.userData.userRepresentationType} changed to PointCloud"); + user.userData.userRepresentationType = UserRepresentationType.PointCloud; + break; + + } + switch (user.userData.userRepresentationType) { case UserRepresentationType.NoRepresentation: imageItem.sprite = Resources.Load("Icons/URNoneIcon"); @@ -256,20 +267,10 @@ private void AddUserComponentOnContent(Transform container, User user) textItem.text += " - (3D Avatar)"; break; case UserRepresentationType.PointCloud: - case UserRepresentationType.Old__PCC_CWIK4A_: - case UserRepresentationType.Old__PCC_PROXY__: - imageItem.sprite = Resources.Load("Icons/URSingleIcon"); + imageItem.sprite = Resources.Load("Icons/URSingleIcon"); textItem.text += " - (Simple PC)"; break; - case UserRepresentationType.Old__PCC_SYNTH__: - imageItem.sprite = Resources.Load("Icons/URSingleIcon"); - textItem.text += " - (Synthetic PC)"; - break; - case UserRepresentationType.Old__PCC_PRERECORDED__: - imageItem.sprite = Resources.Load("Icons/URSingleIcon"); - textItem.text += " - (Prerecorded PC)"; - break; - case UserRepresentationType.AudioOnly: + case UserRepresentationType.AudioOnly: imageItem.sprite = Resources.Load("Icons/URNoneIcon"); textItem.text += " - (Spectator)"; break; @@ -415,6 +416,17 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType userRepresentationLobbyText.text = _representationType.ToString(); // left change the icon 'userRepresentationLobbyImage' switch (_representationType) + { + case UserRepresentationType.Deprecated__PCC_SYNTH__: + case UserRepresentationType.Deprecated__PCC_PRERECORDED__: + case UserRepresentationType.Deprecated__PCC_CWIK4A_: + case UserRepresentationType.Deprecated__PCC_PROXY__: + Debug.LogWarning($"OrchestratorLogin: Deprecated type {_representationType} changed to PointCloud"); + _representationType = UserRepresentationType.PointCloud; + break; + + } + switch (_representationType) { case UserRepresentationType.NoRepresentation: case UserRepresentationType.AudioOnly: @@ -427,10 +439,6 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType userRepresentationLobbyImage.sprite = Resources.Load("Icons/URAvatarIcon"); break; case UserRepresentationType.PointCloud: - case UserRepresentationType.Old__PCC_CWIK4A_: - case UserRepresentationType.Old__PCC_PROXY__: - case UserRepresentationType.Old__PCC_SYNTH__: - case UserRepresentationType.Old__PCC_PRERECORDED__: userRepresentationLobbyImage.sprite = Resources.Load("Icons/URSingleIcon"); break; case UserRepresentationType.NoRepresentationCamera: @@ -442,6 +450,17 @@ private void SetUserRepresentationGUI(UserRepresentationType _representationType private void SetUserRepresentationDescription(UserRepresentationType _representationType) { + switch (_representationType) + { + case UserRepresentationType.Deprecated__PCC_SYNTH__: + case UserRepresentationType.Deprecated__PCC_PRERECORDED__: + case UserRepresentationType.Deprecated__PCC_CWIK4A_: + case UserRepresentationType.Deprecated__PCC_PROXY__: + Debug.LogWarning($"OrchestratorLogin: Deprecated type {_representationType} changed to PointCloud"); + _representationType = UserRepresentationType.PointCloud; + break; + + } // left change the icon 'userRepresentationLobbyImage' switch (_representationType) { @@ -455,21 +474,9 @@ private void SetUserRepresentationDescription(UserRepresentationType _representa selfRepresentationDescription.text = "3D Synthetic Avatar."; break; case UserRepresentationType.PointCloud: - selfRepresentationDescription.text = "Realistic point cloud user representation, captured with RealSense cameras."; + selfRepresentationDescription.text = "Realistic point cloud user representation, captured live."; break; - case UserRepresentationType.Old__PCC_CWIK4A_: - selfRepresentationDescription.text = "Realistic point cloud user representation, captured with Azure Kinect cameras."; - break; - case UserRepresentationType.Old__PCC_PROXY__: - selfRepresentationDescription.text = "Realistic point cloud user representation, captured with 5G phone camera."; - break; - case UserRepresentationType.Old__PCC_SYNTH__: - selfRepresentationDescription.text = "3D Synthetic point cloud avatar."; - break; - case UserRepresentationType.Old__PCC_PRERECORDED__: - selfRepresentationDescription.text = "3D Pre-recorded point cloud."; - break; - case UserRepresentationType.AudioOnly: + case UserRepresentationType.AudioOnly: selfRepresentationDescription.text = "No visual representation, only audio communication."; break; case UserRepresentationType.NoRepresentationCamera: diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs index 382738186..f5f9a647d 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs @@ -26,11 +26,7 @@ public class PointCloudPipelineOther : PointCloudPipelineBase public static void Register() { - RegisterPipelineClass(false, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); RegisterPipelineClass(false, UserRepresentationType.PointCloud, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); - RegisterPipelineClass(false, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); } private static BasePipeline AddPipelineComponent(GameObject dst, UserRepresentationType i) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs index 9daeda58c..4a77797e9 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineSelf.cs @@ -22,11 +22,7 @@ public class PointCloudPipelineSelf : PointCloudPipelineBase, IPointCloudPositio { public static void Register() { - RegisterPipelineClass(true, UserRepresentationType.Old__PCC_CWIK4A_, AddPipelineComponent); RegisterPipelineClass(true, UserRepresentationType.PointCloud, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PROXY__, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.Old__PCC_PRERECORDED__, AddPipelineComponent); - RegisterPipelineClass(true, UserRepresentationType.Old__PCC_SYNTH__, AddPipelineComponent); } protected static BasePipeline AddPipelineComponent(GameObject dst, UserRepresentationType i) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs index a78484017..12348eb29 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointcloudPlayback.cs @@ -127,12 +127,13 @@ public void Awake() dummyUser = new User(); dummyUser.userData = new UserData(); - dummyUser.userData.userRepresentationType = UserRepresentationType.Old__PCC_PRERECORDED__; + dummyUser.userData.userRepresentationType = UserRepresentationType.PointCloud; VRTConfig._User realUser = VRTConfig.Instance.LocalUser; cfg = new VRTConfig._User(); cfg.PCSelfConfig = new VRTConfig._User._PCSelfConfig(); + cfg.PCSelfConfig.capturerType = VRTConfig._User._PCSelfConfig.PCCapturerType.prerecorded; cfg.PCSelfConfig.PrerecordedReaderConfig = new VRTConfig._User._PCSelfConfig._PrerecordedReaderConfig(); if (folder == null || folder == "") { diff --git a/Assets/VRTCore/UserRepresentationType.cs b/Assets/VRTCore/UserRepresentationType.cs index 082c6c883..82bce73dc 100644 --- a/Assets/VRTCore/UserRepresentationType.cs +++ b/Assets/VRTCore/UserRepresentationType.cs @@ -24,19 +24,19 @@ public enum UserRepresentationType /// /// Point cloud (from Kinect camera) /// - Old__PCC_CWIK4A_, + Deprecated__PCC_CWIK4A_, /// /// Point cloud (from remote RGBD camera via proxy) /// - Old__PCC_PROXY__, + Deprecated__PCC_PROXY__, /// /// Synthetic point cloud /// - Old__PCC_SYNTH__, + Deprecated__PCC_SYNTH__, /// /// Prerecorded point cloud /// - Old__PCC_PRERECORDED__, + Deprecated__PCC_PRERECORDED__, /// /// User without visual representation but with audio feed /// diff --git a/Assets/VRTCore/VRTConfig.cs b/Assets/VRTCore/VRTConfig.cs index 18a7d10af..7c935e218 100644 --- a/Assets/VRTCore/VRTConfig.cs +++ b/Assets/VRTCore/VRTConfig.cs @@ -150,6 +150,7 @@ public class _CameraReaderConfig public class _RemoteCameraReaderConfig { public string url; + public bool isCompressed; } public _RemoteCameraReaderConfig RemoteCameraReaderConfig; [Serializable] From 5d22597f8d158325fbf5472777c319d52fa3e5a3 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 8 Aug 2023 17:33:36 +0200 Subject: [PATCH 045/121] Revert "Switch to Jack's home orchestrator for debugging." This reverts commit 4ff37ee853164099cec3adbab8683f75407c410f. --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index d404874a6..c3867bc25 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "orchestratorURL" : "http://sap.local:8080/socket.io/", + "_unused_orchestratorURL" : "http://www.jackjansen.nl:8080/socket.io/", "statsOutputFile" : "-", "_unused_AutoStart" : { "autoLogin" : true, From 809870e49e9ce9c37be8099bef088d63b41ea37e Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 11 Aug 2023 15:30:17 +0200 Subject: [PATCH 046/121] Moved overrides to Tool_OrchestratorLogin. --- .../Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab | 2 +- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- config.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab index 87fe17ec8..820c05bb9 100644 --- a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab @@ -7625,7 +7625,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &220429683944739976 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 092776d51..db128271f 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df35d0450d80f4f32e832cda20f44e1e41725387cbb1b70e0c8b7d3a5146f1f0 -size 49045 +oid sha256:18d22536ceec0ba4e7c234f636d841b334f029ba003e045a450c097fa5369387 +size 48705 diff --git a/config.json b/config.json index c3867bc25..83541eca8 100644 --- a/config.json +++ b/config.json @@ -16,9 +16,10 @@ "autoLeaveAfter" : 0, "autoStopAfterLeave" : false }, - "_unused_LocalUser": { + "LocalUser": { "PCSelfConfig": { + "capturerTypeName" : "auto", "RS2ReaderConfig": { "configFilename": "./cameraconfig.json" }, From b3554a28891a52de819cb2b371362729acbf5a58 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Fri, 11 Aug 2023 16:45:34 +0200 Subject: [PATCH 047/121] Use sap orchestrator. --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 83541eca8..6074e4526 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "_unused_orchestratorURL" : "http://www.jackjansen.nl:8080/socket.io/", + "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "-", "_unused_AutoStart" : { "autoLogin" : true, From cab2add86bbe5bf8b0e57a89e9f32854bbe6a372 Mon Sep 17 00:00:00 2001 From: "ITFCWI-A2LMTC0T\\Ashutosh" Date: Mon, 14 Aug 2023 14:57:51 +0200 Subject: [PATCH 048/121] For all actions that are unused set them to "reference" anyway, with no reference. Fixes #104 (I think for the third time:-) --- .../Prefabs/01_Player/P_Hand_Left.prefab | 166 ++++++++++++++++- .../Prefabs/01_Player/P_Hand_Right.prefab | 170 +++++++++++++++++- .../Prefabs/01_Player/P_Handsfree.prefab | 62 ++++++- 3 files changed, 383 insertions(+), 15 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab index cdf5257dc..7636f0729 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab @@ -185,6 +185,7 @@ MonoBehaviour: m_Bits: 2 m_AttachTransform: {fileID: 3715003807647238045} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -273,6 +274,11 @@ MonoBehaviour: m_HapticHoverCancelIntensity: 0 m_HapticHoverCancelDuration: 0 m_AllowHoverHapticsWhileSelecting: 1 + m_ImproveAccuracyWithSphereCollider: 0 + m_PhysicsLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_PhysicsTriggerInteraction: 1 --- !u!114 &7915410949404801475 MonoBehaviour: m_ObjectHideFlags: 0 @@ -320,6 +326,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 8248158260566104461, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: 3f9fed43-f0f6-490e-aeaf-d7eabba40cc6 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -411,6 +429,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 71106601250685021, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 8804a441-df2b-458c-945f-e47c25b58422 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -438,7 +468,7 @@ MonoBehaviour: m_Reference: {fileID: -7363382999065477798, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -475,6 +505,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aab5b0dedd721de4da94627735649e89, type: 3} m_Name: m_EditorClassIdentifier: + debug: 0 --- !u!1 &3612432402934602080 GameObject: m_ObjectHideFlags: 0 @@ -560,6 +591,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 8248158260566104461, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: ce3a9d72-e425-47ea-923a-21481bc1a00b + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -651,6 +694,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 71106601250685021, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: affabe88-771c-473d-a3bc-f1b575347285 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -678,7 +733,7 @@ MonoBehaviour: m_Reference: {fileID: -7363382999065477798, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -776,6 +831,7 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 737890489006591557, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + debug: 0 currentState: 0 --- !u!1 &4787018679340500038 GameObject: @@ -861,6 +917,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 8248158260566104461, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: dfe0a50f-9888-44fd-86f3-c30579055b2e + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -952,6 +1020,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 71106601250685021, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: f9a961a1-347f-4bc5-833b-88b680a91250 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -979,7 +1059,7 @@ MonoBehaviour: m_Reference: {fileID: -7363382999065477798, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -1024,6 +1104,7 @@ MonoBehaviour: m_Bits: 4294967295 m_AttachTransform: {fileID: 8972252893984721651} m_KeepSelectedTargetValid: 1 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -1108,9 +1189,12 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 m_RaycastTriggerInteraction: 2 + m_RaycastSnapVolumeInteraction: 1 m_HitClosestOnly: 0 m_HoverToSelect: 0 m_HoverTimeToSelect: 0.5 + m_AutoDeselect: 0 + m_TimeToAutoDeselect: 3 m_EnableUIInteraction: 1 m_AllowAnchorControl: 0 m_UseForceGrab: 1 @@ -1118,6 +1202,15 @@ MonoBehaviour: m_TranslateSpeed: 1 m_AnchorRotateReferenceFrame: {fileID: 0} m_AnchorRotationMode: 0 + m_UIHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_UIHoverExited: + m_PersistentCalls: + m_Calls: [] + m_EnableARRaycasting: 0 + m_OccludeARHitsWith3DObjects: 0 + m_OccludeARHitsWith2DObjects: 0 --- !u!114 &4693053478678025190 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1133,6 +1226,11 @@ MonoBehaviour: m_LineWidth: 0.02 m_OverrideInteractorLineLength: 1 m_LineLength: 10 + m_AutoAdjustLineLength: 0 + m_MinLineLength: 0.5 + m_UseDistanceToHitAsMaxLineLength: 1 + m_LineRetractionDelay: 0.5 + m_LineLengthChangeSpeed: 12 m_WidthCurve: serializedVersion: 2 m_Curve: @@ -1157,6 +1255,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 + m_SetLineColorGradient: 1 m_ValidColorGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -1252,6 +1351,11 @@ MonoBehaviour: m_BlockedReticle: {fileID: 0} m_StopLineAtFirstRaycastHit: 1 m_StopLineAtSelection: 0 + m_SnapEndpointIfAvailable: 1 + m_LineBendRatio: 0.5 + m_OverrideInteractorLineOrigin: 1 + m_LineOriginTransform: {fileID: 0} + m_LineOriginOffset: 0 --- !u!120 &4590018522529363774 LineRenderer: m_ObjectHideFlags: 0 @@ -1427,6 +1531,7 @@ MonoBehaviour: m_Bits: 4 m_AttachTransform: {fileID: 0} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -1515,6 +1620,11 @@ MonoBehaviour: m_HapticHoverCancelIntensity: 0 m_HapticHoverCancelDuration: 0 m_AllowHoverHapticsWhileSelecting: 1 + m_ImproveAccuracyWithSphereCollider: 0 + m_PhysicsLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_PhysicsTriggerInteraction: 1 --- !u!1 &5810182806662697559 GameObject: m_ObjectHideFlags: 0 @@ -1680,6 +1790,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 8248158260566104461, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 0 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: 49881426-c20d-4a53-b93f-28446d08b1e1 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -1771,6 +1893,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 71106601250685021, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 0 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 27b1be8f-be17-418b-9098-d146f16a159f + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -1843,6 +1977,7 @@ MonoBehaviour: m_Bits: 8 m_AttachTransform: {fileID: 0} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -1927,9 +2062,12 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 m_RaycastTriggerInteraction: 1 + m_RaycastSnapVolumeInteraction: 1 m_HitClosestOnly: 0 m_HoverToSelect: 0 m_HoverTimeToSelect: 0.5 + m_AutoDeselect: 0 + m_TimeToAutoDeselect: 3 m_EnableUIInteraction: 0 m_AllowAnchorControl: 0 m_UseForceGrab: 0 @@ -1937,6 +2075,15 @@ MonoBehaviour: m_TranslateSpeed: 1 m_AnchorRotateReferenceFrame: {fileID: 0} m_AnchorRotationMode: 0 + m_UIHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_UIHoverExited: + m_PersistentCalls: + m_Calls: [] + m_EnableARRaycasting: 0 + m_OccludeARHitsWith3DObjects: 0 + m_OccludeARHitsWith2DObjects: 0 --- !u!120 &7446867246861359660 LineRenderer: m_ObjectHideFlags: 0 @@ -2060,6 +2207,11 @@ MonoBehaviour: m_LineWidth: 0.02 m_OverrideInteractorLineLength: 1 m_LineLength: 10 + m_AutoAdjustLineLength: 0 + m_MinLineLength: 0.5 + m_UseDistanceToHitAsMaxLineLength: 1 + m_LineRetractionDelay: 0.5 + m_LineLengthChangeSpeed: 12 m_WidthCurve: serializedVersion: 2 m_Curve: @@ -2084,6 +2236,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 + m_SetLineColorGradient: 1 m_ValidColorGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -2179,6 +2332,11 @@ MonoBehaviour: m_BlockedReticle: {fileID: 0} m_StopLineAtFirstRaycastHit: 1 m_StopLineAtSelection: 0 + m_SnapEndpointIfAvailable: 1 + m_LineBendRatio: 0.5 + m_OverrideInteractorLineOrigin: 1 + m_LineOriginTransform: {fileID: 0} + m_LineOriginOffset: 0 --- !u!1 &5862755559334039368 GameObject: m_ObjectHideFlags: 0 @@ -2267,6 +2425,7 @@ MonoBehaviour: ViveController: {fileID: 1282686269084641543} OtherController: {fileID: 6416723836032543647} controllerType: 0 + debug: 0 --- !u!114 &5931296429021814033 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2280,6 +2439,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: handNetworkController: {fileID: 0} + debug: 0 --- !u!1 &6544830567396037082 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab index f5770fdbc..9aadf9af6 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab @@ -133,6 +133,7 @@ MonoBehaviour: m_Bits: 4 m_AttachTransform: {fileID: 0} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -221,6 +222,11 @@ MonoBehaviour: m_HapticHoverCancelIntensity: 0 m_HapticHoverCancelDuration: 0 m_AllowHoverHapticsWhileSelecting: 1 + m_ImproveAccuracyWithSphereCollider: 0 + m_PhysicsLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_PhysicsTriggerInteraction: 1 --- !u!1 &4874265173826406071 GameObject: m_ObjectHideFlags: 0 @@ -389,6 +395,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 5101698808175986029, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: eb43a624-9922-4213-8933-22d245a1ef13 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -480,6 +498,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: -5908353012961274365, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 6e3705fc-2680-4f71-a807-f500d204a9ef + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -507,12 +537,12 @@ MonoBehaviour: m_Reference: {fileID: -5913262927076077117, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: - m_Name: + m_Name: Directional Anchor Rotation m_Type: 0 m_ExpectedControlType: - m_Id: + m_Id: 18882e43-4c5e-4680-bcfe-a1b6413f1bd2 m_Processors: m_Interactions: m_SingletonActionBindings: [] @@ -605,6 +635,7 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 2307464322626738743, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + debug: 0 currentState: 0 --- !u!1 &5601917454479471027 GameObject: @@ -759,6 +790,7 @@ MonoBehaviour: m_Bits: 2 m_AttachTransform: {fileID: 656747764866109701} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -847,6 +879,11 @@ MonoBehaviour: m_HapticHoverCancelIntensity: 0 m_HapticHoverCancelDuration: 0 m_AllowHoverHapticsWhileSelecting: 1 + m_ImproveAccuracyWithSphereCollider: 0 + m_PhysicsLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_PhysicsTriggerInteraction: 1 --- !u!114 &8237340509810971193 MonoBehaviour: m_ObjectHideFlags: 0 @@ -894,6 +931,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 5101698808175986029, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: dab2e58e-3c6c-40eb-b818-d2119b12292e + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -985,6 +1034,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: -5908353012961274365, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: 88a11f63-6543-42b1-996f-54c808d1c87c + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -1012,7 +1073,7 @@ MonoBehaviour: m_Reference: {fileID: -5913262927076077117, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -1049,6 +1110,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aab5b0dedd721de4da94627735649e89, type: 3} m_Name: m_EditorClassIdentifier: + debug: 0 --- !u!1 &6652609405479520317 GameObject: m_ObjectHideFlags: 0 @@ -1137,6 +1199,7 @@ MonoBehaviour: ViveController: {fileID: 7903991079643624856} OtherController: {fileID: 8180744644253625686} controllerType: 0 + debug: 0 --- !u!114 &6617721036135197020 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1150,6 +1213,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: handNetworkController: {fileID: 0} + debug: 0 --- !u!1 &6656451334728806882 GameObject: m_ObjectHideFlags: 0 @@ -1348,6 +1412,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 5101698808175986029, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: a46f8ebb-d2f4-4d37-b32b-8f5e58413d8f + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -1439,6 +1515,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: -5908353012961274365, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: cfe55da1-9d40-4b75-8c62-5afd37711ec0 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -1466,7 +1554,7 @@ MonoBehaviour: m_Reference: {fileID: -5913262927076077117, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -1511,6 +1599,7 @@ MonoBehaviour: m_Bits: 4294967295 m_AttachTransform: {fileID: 871653300228096306} m_KeepSelectedTargetValid: 1 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -1595,9 +1684,12 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 m_RaycastTriggerInteraction: 2 + m_RaycastSnapVolumeInteraction: 1 m_HitClosestOnly: 0 m_HoverToSelect: 0 m_HoverTimeToSelect: 0.5 + m_AutoDeselect: 0 + m_TimeToAutoDeselect: 3 m_EnableUIInteraction: 1 m_AllowAnchorControl: 1 m_UseForceGrab: 1 @@ -1605,6 +1697,15 @@ MonoBehaviour: m_TranslateSpeed: 1 m_AnchorRotateReferenceFrame: {fileID: 0} m_AnchorRotationMode: 0 + m_UIHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_UIHoverExited: + m_PersistentCalls: + m_Calls: [] + m_EnableARRaycasting: 0 + m_OccludeARHitsWith3DObjects: 0 + m_OccludeARHitsWith2DObjects: 0 --- !u!114 &6510838405812380659 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1620,6 +1721,11 @@ MonoBehaviour: m_LineWidth: 0.02 m_OverrideInteractorLineLength: 1 m_LineLength: 10 + m_AutoAdjustLineLength: 0 + m_MinLineLength: 0.5 + m_UseDistanceToHitAsMaxLineLength: 1 + m_LineRetractionDelay: 0.5 + m_LineLengthChangeSpeed: 12 m_WidthCurve: serializedVersion: 2 m_Curve: @@ -1644,6 +1750,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 + m_SetLineColorGradient: 1 m_ValidColorGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -1739,6 +1846,11 @@ MonoBehaviour: m_BlockedReticle: {fileID: 0} m_StopLineAtFirstRaycastHit: 1 m_StopLineAtSelection: 0 + m_SnapEndpointIfAvailable: 1 + m_LineBendRatio: 0.5 + m_OverrideInteractorLineOrigin: 1 + m_LineOriginTransform: {fileID: 0} + m_LineOriginOffset: 0 --- !u!120 &6404131997172859013 LineRenderer: m_ObjectHideFlags: 0 @@ -1929,6 +2041,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 5101698808175986029, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_IsTrackedAction: + m_UseReference: 0 + m_Action: + m_Name: + m_Type: 1 + m_ExpectedControlType: + m_Id: + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: m_UseReference: 1 m_Action: @@ -2020,6 +2144,18 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: -5908353012961274365, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} + m_UIScrollAction: + m_UseReference: 0 + m_Action: + m_Name: + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: m_UseReference: 1 m_Action: @@ -2092,6 +2228,7 @@ MonoBehaviour: m_Bits: 8 m_AttachTransform: {fileID: 0} m_KeepSelectedTargetValid: 0 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -2176,9 +2313,12 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 m_RaycastTriggerInteraction: 1 + m_RaycastSnapVolumeInteraction: 1 m_HitClosestOnly: 0 m_HoverToSelect: 0 m_HoverTimeToSelect: 0.5 + m_AutoDeselect: 0 + m_TimeToAutoDeselect: 3 m_EnableUIInteraction: 0 m_AllowAnchorControl: 0 m_UseForceGrab: 0 @@ -2186,6 +2326,15 @@ MonoBehaviour: m_TranslateSpeed: 1 m_AnchorRotateReferenceFrame: {fileID: 0} m_AnchorRotationMode: 0 + m_UIHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_UIHoverExited: + m_PersistentCalls: + m_Calls: [] + m_EnableARRaycasting: 0 + m_OccludeARHitsWith3DObjects: 0 + m_OccludeARHitsWith2DObjects: 0 --- !u!120 &2364541389494717057 LineRenderer: m_ObjectHideFlags: 0 @@ -2309,6 +2458,11 @@ MonoBehaviour: m_LineWidth: 0.02 m_OverrideInteractorLineLength: 1 m_LineLength: 10 + m_AutoAdjustLineLength: 0 + m_MinLineLength: 0.5 + m_UseDistanceToHitAsMaxLineLength: 1 + m_LineRetractionDelay: 0.5 + m_LineLengthChangeSpeed: 12 m_WidthCurve: serializedVersion: 2 m_Curve: @@ -2333,6 +2487,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 + m_SetLineColorGradient: 1 m_ValidColorGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -2428,6 +2583,11 @@ MonoBehaviour: m_BlockedReticle: {fileID: 0} m_StopLineAtFirstRaycastHit: 1 m_StopLineAtSelection: 0 + m_SnapEndpointIfAvailable: 1 + m_LineBendRatio: 0.5 + m_OverrideInteractorLineOrigin: 1 + m_LineOriginTransform: {fileID: 0} + m_LineOriginOffset: 0 --- !u!1 &8384752376253176862 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Handsfree.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Handsfree.prefab index 94be0b0ec..f1ca41c8e 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Handsfree.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Handsfree.prefab @@ -211,7 +211,7 @@ MonoBehaviour: m_ModelSelectTransition: m_ModelDeSelectTransition: m_PositionAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Position m_Type: 0 @@ -223,7 +223,7 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 0} m_RotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Rotation m_Type: 0 @@ -234,8 +234,20 @@ MonoBehaviour: m_SingletonActionBindings: [] m_Flags: 0 m_Reference: {fileID: 0} + m_IsTrackedAction: + m_UseReference: 1 + m_Action: + m_Name: Is Tracked + m_Type: 1 + m_ExpectedControlType: + m_Id: cc02c1d3-994c-46c6-8362-2ad035b2440e + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 1 + m_Reference: {fileID: 0} m_TrackingStateAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Tracking State m_Type: 0 @@ -299,7 +311,7 @@ MonoBehaviour: m_Reference: {fileID: 487384405310657286, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_UIPressAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: UI Press m_Type: 0 @@ -311,7 +323,7 @@ MonoBehaviour: m_Flags: 0 m_Reference: {fileID: 0} m_UIPressActionValue: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: UI Press Action Value m_Type: 0 @@ -322,8 +334,20 @@ MonoBehaviour: m_SingletonActionBindings: [] m_Flags: 0 m_Reference: {fileID: 0} + m_UIScrollAction: + m_UseReference: 1 + m_Action: + m_Name: UI Scroll + m_Type: 0 + m_ExpectedControlType: Vector2 + m_Id: e969c3a1-9de0-4e16-a608-fd726cdacc3c + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} m_HapticDeviceAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Haptic Device m_Type: 0 @@ -348,7 +372,7 @@ MonoBehaviour: m_Reference: {fileID: 2134134894288584620, guid: 721820db5472c4cdb9e2c49de50d8533, type: 3} m_DirectionalAnchorRotationAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Directional Anchor Rotation m_Type: 0 @@ -393,6 +417,7 @@ MonoBehaviour: m_Bits: 4294967295 m_AttachTransform: {fileID: 1833302077194575429} m_KeepSelectedTargetValid: 1 + m_DisableVisualsWhenBlockedInGroup: 1 m_StartingSelectedInteractable: {fileID: 0} m_StartingTargetFilter: {fileID: 0} m_HoverEntered: @@ -477,9 +502,12 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 m_RaycastTriggerInteraction: 2 + m_RaycastSnapVolumeInteraction: 1 m_HitClosestOnly: 0 m_HoverToSelect: 0 m_HoverTimeToSelect: 0.5 + m_AutoDeselect: 0 + m_TimeToAutoDeselect: 3 m_EnableUIInteraction: 1 m_AllowAnchorControl: 0 m_UseForceGrab: 1 @@ -487,6 +515,15 @@ MonoBehaviour: m_TranslateSpeed: 1 m_AnchorRotateReferenceFrame: {fileID: 0} m_AnchorRotationMode: 0 + m_UIHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_UIHoverExited: + m_PersistentCalls: + m_Calls: [] + m_EnableARRaycasting: 0 + m_OccludeARHitsWith3DObjects: 0 + m_OccludeARHitsWith2DObjects: 0 --- !u!114 &8799694426717845596 MonoBehaviour: m_ObjectHideFlags: 0 @@ -502,6 +539,11 @@ MonoBehaviour: m_LineWidth: 0.02 m_OverrideInteractorLineLength: 1 m_LineLength: 10 + m_AutoAdjustLineLength: 0 + m_MinLineLength: 0.5 + m_UseDistanceToHitAsMaxLineLength: 1 + m_LineRetractionDelay: 0.5 + m_LineLengthChangeSpeed: 12 m_WidthCurve: serializedVersion: 2 m_Curve: @@ -526,6 +568,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 + m_SetLineColorGradient: 1 m_ValidColorGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -621,6 +664,11 @@ MonoBehaviour: m_BlockedReticle: {fileID: 0} m_StopLineAtFirstRaycastHit: 1 m_StopLineAtSelection: 0 + m_SnapEndpointIfAvailable: 1 + m_LineBendRatio: 0.5 + m_OverrideInteractorLineOrigin: 1 + m_LineOriginTransform: {fileID: 0} + m_LineOriginOffset: 0 --- !u!120 &9018722302436854738 LineRenderer: m_ObjectHideFlags: 0 From be0dc624d1cd607fa39dade345917dda95b7f666 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 14 Aug 2023 16:41:31 +0200 Subject: [PATCH 049/121] Use OpenXR on desktop. --- Assets/XR/XRGeneralSettings.asset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/XR/XRGeneralSettings.asset b/Assets/XR/XRGeneralSettings.asset index 598d17475..dc3467ee8 100644 --- a/Assets/XR/XRGeneralSettings.asset +++ b/Assets/XR/XRGeneralSettings.asset @@ -46,7 +46,7 @@ MonoBehaviour: m_AutomaticLoading: 0 m_AutomaticRunning: 0 m_Loaders: - - {fileID: 11400000, guid: 13b43a4acfda05c449b9c4298dbb843e, type: 2} + - {fileID: 11400000, guid: 0c4d8b9e5ce402d44bd99110d0f9f36a, type: 2} --- !u!114 &6869665334008911177 MonoBehaviour: m_ObjectHideFlags: 0 From b8b9e8ce376d506c8fc7519268445af17fe30357 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 14 Aug 2023 16:43:09 +0200 Subject: [PATCH 050/121] For some reason the head tracking actions got lost? Re-enabled them. If this happens again, ever: the symptom is that the world is attached to your head when you have an HMD. --- .../Prefabs/01_Player/P_Self_Player.prefab | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab index 4f24e147e..c2064d9e2 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab @@ -323,44 +323,43 @@ MonoBehaviour: m_EditorClassIdentifier: m_TrackingType: 0 m_UpdateType: 0 + m_IgnoreTrackingState: 0 m_PositionInput: - m_UseReference: 0 + m_UseReference: 1 m_Action: - m_Name: Position + m_Name: m_Type: 0 - m_ExpectedControlType: Vector3 - m_Id: 9806e770-f094-4dd7-b9f0-742dfae5a441 + m_ExpectedControlType: + m_Id: 6c1de195-dbed-4c04-a05f-b229cf891358 m_Processors: m_Interactions: - m_SingletonActionBindings: - - m_Name: - m_Id: 88a5fa0d-e9f1-40b6-89ba-8dccf46f0103 - m_Path: /centerEyePosition - m_Interactions: - m_Processors: - m_Groups: - m_Action: Position - m_Flags: 0 + m_SingletonActionBindings: [] m_Flags: 0 - m_Reference: {fileID: 0} + m_Reference: {fileID: 7862207684358717888, guid: 721820db5472c4cdb9e2c49de50d8533, + type: 3} m_RotationInput: - m_UseReference: 0 + m_UseReference: 1 + m_Action: + m_Name: + m_Type: 0 + m_ExpectedControlType: + m_Id: 8bc01c78-c6bf-41dc-a529-1612480e489c + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: -530380113134220495, guid: 721820db5472c4cdb9e2c49de50d8533, + type: 3} + m_TrackingStateInput: + m_UseReference: 1 m_Action: - m_Name: Rotation + m_Name: Tracking State Input m_Type: 0 - m_ExpectedControlType: Quaternion - m_Id: 51014511-65b1-43e9-a7f8-4417c8dc719e + m_ExpectedControlType: + m_Id: 5a4ab819-3761-461d-8c35-9c05dcd3caee m_Processors: m_Interactions: - m_SingletonActionBindings: - - m_Name: - m_Id: 7f0a974b-182c-44e5-9af2-0311b242237a - m_Path: /centerEyeRotation - m_Interactions: - m_Processors: - m_Groups: - m_Action: Rotation - m_Flags: 0 + m_SingletonActionBindings: [] m_Flags: 0 m_Reference: {fileID: 0} m_PositionAction: @@ -1097,6 +1096,7 @@ MonoBehaviour: m_RepeatDelay: 0.5 m_RepeatRate: 0.1 m_TrackedDeviceDragThresholdMultiplier: 1.4 + m_TrackedScrollDeltaMultiplier: 5 m_ActiveInputMode: 0 m_MaxTrackedDeviceRaycastDistance: 1000 m_EnableXRInput: 1 @@ -1806,6 +1806,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_currentRealController: 0 m_currentVisibleController: 0 + debug: 0 directInteractionIsEnabled: 0 --- !u!1 &7220790933353918533 GameObject: From f4cae8798244037f3f5cc58f45ae9c31861da557 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 14 Aug 2023 16:44:04 +0200 Subject: [PATCH 051/121] Disable all interactors at startup (so we don't get spurious enabled calls for controllers we don't have). --- Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab | 4 ++-- Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab index 7636f0729..b1679bd0c 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Left.prefab @@ -523,7 +523,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &3440647670940916381 Transform: m_ObjectHideFlags: 0 @@ -852,7 +852,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2560253360125558930 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab index 9aadf9af6..cc98e2b52 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Hand_Right.prefab @@ -327,7 +327,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2323218244091371060 Transform: m_ObjectHideFlags: 0 @@ -1347,7 +1347,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &672475282339907142 Transform: m_ObjectHideFlags: 0 From 02bed15d6670d70eaef711700de160b1f85bf3aa Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 14 Aug 2023 16:44:31 +0200 Subject: [PATCH 052/121] Scene changes that happened with the previous commits. --- .../00_Tools/Tool_scenesetup_solo.prefab | 43 ++++++++++++------- .../LoginManager/Scenes/LoginManager.unity | 4 +- .../SoloPlayground/SoloPlayground.unity | 4 +- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup_solo.prefab b/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup_solo.prefab index afac9f380..934f8cbc8 100644 --- a/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup_solo.prefab +++ b/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup_solo.prefab @@ -142,9 +142,13 @@ MonoBehaviour: acceptDesyncOnDataUnavailable: 0 LocalUser: PCSelfConfig: - RS2ReaderConfig: - configFilename: ./cameraconfig.xml - wantedSkeleton: 0 + capturerType: 0 + capturerTypeName: + CameraReaderConfig: + configFilename: + RemoteCameraReaderConfig: + url: + isCompressed: 0 ProxyReaderConfig: localIP: port: 9335 @@ -258,7 +262,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b345692cec56f8a4ca6d71758912a011, type: 3} m_Name: m_EditorClassIdentifier: - player: {fileID: 6311498540185021984} playerManager: {fileID: 9162158745625746543} userRepresentation: 2 --- !u!114 &2454423965594524020 @@ -512,6 +515,26 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 7957250788412427323} m_Modifications: + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_PositionInput.m_Action.m_ExpectedControlType + value: + objectReference: {fileID: 0} + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_RotationInput.m_Action.m_ExpectedControlType + value: + objectReference: {fileID: 0} + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_PositionInput.m_Action.m_SingletonActionBindings.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_RotationInput.m_Action.m_SingletonActionBindings.Array.size + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1246181775895122469, guid: fceec8934b5ae4fdaa36454e0b30346f, type: 3} propertyPath: previewPlayer @@ -606,18 +629,6 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 7957250789301915210} m_PrefabAsset: {fileID: 0} ---- !u!114 &6311498540185021984 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 4177976052428464234, guid: fceec8934b5ae4fdaa36454e0b30346f, - type: 3} - m_PrefabInstance: {fileID: 7957250789301915210} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8410044713637561585} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 54d3c1410d4ad4748bb28c8bd1a1b110, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!4 &8410044713637561486 stripped Transform: m_CorrespondingSourceObject: {fileID: 1935332283100515012, guid: fceec8934b5ae4fdaa36454e0b30346f, diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index db128271f..111c2886f 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18d22536ceec0ba4e7c234f636d841b334f029ba003e045a450c097fa5369387 -size 48705 +oid sha256:237f3d988e30e3267b49100b07f55aeae404819a395c165d7a6352ea1b62df2e +size 47992 diff --git a/Assets/Pilots/SoloPlayground/SoloPlayground.unity b/Assets/Pilots/SoloPlayground/SoloPlayground.unity index 9ef4a0307..55b37415d 100644 --- a/Assets/Pilots/SoloPlayground/SoloPlayground.unity +++ b/Assets/Pilots/SoloPlayground/SoloPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6cf7e6dfa34cc5e0f5220b35fd67a00592cb636fa6470b0122af0cc1dc6ee73d -size 145042 +oid sha256:815f05020eae3f83773fa44677ef8917459439089c86614283aa5bab59d397c7 +size 144751 From 0a5e02962e56fa78087433ba91b8a2d8733fddd2 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 12:04:57 +0200 Subject: [PATCH 053/121] Removed Live Presenter support (initially inside #if outdated_orchestrator blocks). --- .../OrchestratorController.cs | 16 +++++++++++++--- .../OrchestratorWrapping/OrchestratorElements.cs | 4 +++- .../OrchestratorInterfaces.cs | 3 ++- .../OrchestratorWrapping/OrchestratorWrapper.cs | 10 +++++++--- .../LoginManager/Scripts/OrchestratorLogin.cs | 12 +++++++++--- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 1c596ca62..90ed79672 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -72,8 +72,11 @@ public enum orchestratorConnectionStatus { //Rooms private List availableRoomInstances; +#if outdated_orchestrator + //LivePresenter private LivePresenterData livePresenterData; +#endif // user Login state private bool userIsLogged = false; @@ -95,7 +98,7 @@ public enum orchestratorConnectionStatus { private bool collectSFULogs = false; private bool autoStopOnLeave = false; - #endregion +#endregion #region public @@ -146,8 +149,10 @@ public static OrchestratorController Instance { public Action OnGetScenarioEvent; public Action OnGetScenariosEvent; +#if outdated_orchestrator // Orchestrator Live Events public Action OnGetLiveDataEvent; +#endif // Orchestrator User Events public Action OnGetUsersEvent; @@ -197,10 +202,12 @@ public void StartRetrievingData() { public Session[] AvailableSessions { get { return availableSessions?.ToArray(); } } public Session MySession { get { return mySession; } } public RoomInstance[] AvailableRooms { get { return availableRoomInstances?.ToArray(); } } +#if outdated_orchestrator public LivePresenterData LivePresenterData { get { return livePresenterData; } } +#endif public bool CollectSFULogs { get { return collectSFULogs; } set { collectSFULogs = value; } } - #endregion +#endregion #region Unity @@ -516,9 +523,11 @@ public void OnGetScenarioInstanceInfoResponse(ResponseStatus status, ScenarioIns } if (enableLogging) Debug.Log("OrchestratorController: OnGetScenarioInstanceInfoResponse: Scenario instance succesfully retrieved: " + scenario.scenarioName + "."); +#if outdated_orchestrator // now retrieve the url of the Live presenter stream orchestratorWrapper.GetLivePresenterData(); +#endif myScenario = scenario; OnGetScenarioEvent?.Invoke(myScenario); } @@ -673,6 +682,7 @@ public void OnGetScenariosResponse(ResponseStatus status, List scenari } #endregion +#if outdated_orchestrator #region Live @@ -690,7 +700,7 @@ public void OnGetLivePresenterDataResponse(ResponseStatus status, LivePresenterD } #endregion - +#endif #region Users public void GetUsers() { diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index 1eaccd355..6a4e66718 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -108,6 +108,8 @@ public class SfuData : OrchestratorElement public SfuData() { } } +#if outdated_orchestrator + public class LivePresenterData : OrchestratorElement { public string liveAddress = ""; @@ -116,7 +118,7 @@ public class LivePresenterData : OrchestratorElement // empty constructor callled by the JsonData parser public LivePresenterData() { } } - +#endif public class DataStream : OrchestratorElement { public string dataStreamUserId = ""; diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index 22d7c271c..130fe7cd3 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -66,8 +66,9 @@ public interface IOrchestratorResponsesListener void OnJoinSessionResponse(ResponseStatus status, Session session); void OnLeaveSessionResponse(ResponseStatus status); +#if outdated_orchestrator void OnGetLivePresenterDataResponse(ResponseStatus status, LivePresenterData liveData); - +#endif void OnGetScenariosResponse(ResponseStatus status, List scenarios); void OnGetScenarioInstanceInfoResponse(ResponseStatus status, ScenarioInstance scenario); diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index f0628a942..55cb10a8c 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -375,6 +375,8 @@ private void OnLeaveSessionResponse(OrchestratorCommand command, OrchestratorRes if (ResponsesListener != null) ResponsesListener.OnLeaveSessionResponse(status); } +#if outdated_orchestrator + public void GetLivePresenterData() { OrchestratorCommand command = GetOrchestratorCommand("GetLivePresenterData"); @@ -388,7 +390,7 @@ private void GetLivePresenterDataResponse(OrchestratorCommand command, Orchestra if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: GetLivePresenterDataResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnGetLivePresenterDataResponse(status, liveData); } - +#endif public void GetScenarios() { OrchestratorCommand command = GetOrchestratorCommand("GetScenarios"); @@ -620,7 +622,7 @@ private void OnGetRegisteredDataStreams(OrchestratorCommand command, Orchestrato if (ResponsesListener != null) ResponsesListener.OnGetRegisteredDataStreams(status, lDataStreams); } - #endregion +#endregion #region commands - no Acks @@ -854,9 +856,11 @@ public void InitGrammar() }, OnJoinSessionResponse), new OrchestratorCommand("LeaveSession", null, OnLeaveSessionResponse), +#if outdated_orchestrator //live stream new OrchestratorCommand("GetLivePresenterData", null, GetLivePresenterDataResponse), +#endif //scenarios new OrchestratorCommand("GetScenarios", null, OnGetScenariosResponse), @@ -1005,6 +1009,6 @@ public OrchestratorCommand GetOrchestratorCommand(string commandName) } return null; } - #endregion +#endregion } } \ No newline at end of file diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index f3dfd426b..81d460f64 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1066,7 +1066,9 @@ private void InitialiseControllerEvents() OrchestratorController.Instance.OnUserLeaveSessionEvent += OnUserLeftSessionHandler; OrchestratorController.Instance.OnGetScenarioEvent += OnGetScenarioInstanceInfoHandler; OrchestratorController.Instance.OnGetScenariosEvent += OnGetScenariosHandler; +#if outdated_orchestrator OrchestratorController.Instance.OnGetLiveDataEvent += OnGetLivePresenterDataHandler; +#endif OrchestratorController.Instance.OnGetUsersEvent += OnGetUsersHandler; OrchestratorController.Instance.OnAddUserEvent += OnAddUserHandler; OrchestratorController.Instance.OnGetUserInfoEvent += OnGetUserInfoHandler; @@ -1100,7 +1102,9 @@ private void TerminateControllerEvents() OrchestratorController.Instance.OnUserLeaveSessionEvent -= OnUserLeftSessionHandler; OrchestratorController.Instance.OnGetScenarioEvent -= OnGetScenarioInstanceInfoHandler; OrchestratorController.Instance.OnGetScenariosEvent -= OnGetScenariosHandler; +#if outdated_orchestrator OrchestratorController.Instance.OnGetLiveDataEvent -= OnGetLivePresenterDataHandler; +#endif OrchestratorController.Instance.OnGetUsersEvent -= OnGetUsersHandler; OrchestratorController.Instance.OnAddUserEvent -= OnAddUserHandler; OrchestratorController.Instance.OnGetUserInfoEvent -= OnGetUserInfoHandler; @@ -1113,7 +1117,7 @@ private void TerminateControllerEvents() OrchestratorController.Instance.OnErrorEvent -= OnErrorHandler; } - #endregion +#endregion #region Commands @@ -1522,6 +1526,8 @@ private void OnGetScenariosHandler(Scenario[] scenarios) #endregion +#if outdated_orchestrator + #region Live private void OnGetLivePresenterDataHandler(LivePresenterData liveData) @@ -1530,7 +1536,7 @@ private void OnGetLivePresenterDataHandler(LivePresenterData liveData) } #endregion - +#endif #region Users private void GetUsers() @@ -1753,7 +1759,7 @@ private void OnErrorHandler(ResponseStatus status) #endregion - #endregion +#endregion } From 5cde9eb1d0b32e72cb304184c41707cb314c0665 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 13:29:01 +0200 Subject: [PATCH 054/121] Rooms are gone. --- .../OrchestratorWrapping/OrchestratorController.cs | 9 +++++---- .../OrchestratorWrapping/OrchestratorInterfaces.cs | 2 ++ .../API/OrchestratorWrapping/OrchestratorWrapper.cs | 8 ++++++-- .../LoginManager/Scripts/OrchestratorLogin.cs | 13 ++++++++++--- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 90ed79672..d044db243 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -69,11 +69,10 @@ public enum orchestratorConnectionStatus { private ScenarioInstance myScenario; private List availableScenarios; +#if outdated_orchestrator //Rooms private List availableRoomInstances; -#if outdated_orchestrator - //LivePresenter private LivePresenterData livePresenterData; #endif @@ -201,8 +200,8 @@ public void StartRetrievingData() { public ScenarioInstance MyScenario { get { return myScenario; } } public Session[] AvailableSessions { get { return availableSessions?.ToArray(); } } public Session MySession { get { return mySession; } } - public RoomInstance[] AvailableRooms { get { return availableRoomInstances?.ToArray(); } } #if outdated_orchestrator + public RoomInstance[] AvailableRooms { get { return availableRoomInstances?.ToArray(); } } public LivePresenterData LivePresenterData { get { return livePresenterData; } } #endif public bool CollectSFULogs { get { return collectSFULogs; } set { collectSFULogs = value; } } @@ -825,6 +824,8 @@ public void OnDeleteUserResponse(ResponseStatus status) { #endregion +#if outdated_orchestrator + #region Rooms public void GetRooms() { @@ -874,7 +875,7 @@ public void OnLeaveRoomResponse(ResponseStatus status) { } #endregion - +#endif #region Messages public void SendMessage(string pMessage, string pUserID) { diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index 130fe7cd3..1b943867c 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -79,10 +79,12 @@ public interface IOrchestratorResponsesListener void OnUpdateUserDataJsonResponse(ResponseStatus status); void OnClearUserDataResponse(ResponseStatus status); void OnDeleteUserResponse(ResponseStatus status); +#if outdated_orchestrator void OnGetRoomsResponse(ResponseStatus status, List rooms); void OnJoinRoomResponse(ResponseStatus status); void OnLeaveRoomResponse(ResponseStatus status); +#endif void OnSendMessageResponse(ResponseStatus status); void OnSendMessageToAllResponse(ResponseStatus status); diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 55cb10a8c..bfcc0d4c3 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -523,6 +523,8 @@ private void OnDeleteUserResponse(OrchestratorCommand command, OrchestratorRespo if (ResponsesListener != null) ResponsesListener.OnDeleteUserResponse(status); } +#if outdated_orchestrator + public void GetRooms() { OrchestratorCommand command = GetOrchestratorCommand("GetRooms"); @@ -563,7 +565,7 @@ private void OnLeaveRoomResponse(OrchestratorCommand command, OrchestratorRespon if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnLeaveRoomResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnLeaveRoomResponse(status); } - +#endif public void SendMessage(string message, string userId) { OrchestratorCommand command = GetOrchestratorCommand("SendMessage"); @@ -903,6 +905,8 @@ public void InitGrammar() }, OnDeleteUserResponse), +#if outdated_orchestrator + //rooms new OrchestratorCommand("GetRooms", null, OnGetRoomsResponse), new OrchestratorCommand("JoinRoom", new List @@ -911,7 +915,7 @@ public void InitGrammar() }, OnJoinRoomResponse), new OrchestratorCommand("LeaveRoom", null, OnLeaveRoomResponse), - +#endif //messages new OrchestratorCommand("SendMessage", new List { diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 81d460f64..80a35255c 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1072,9 +1072,12 @@ private void InitialiseControllerEvents() OrchestratorController.Instance.OnGetUsersEvent += OnGetUsersHandler; OrchestratorController.Instance.OnAddUserEvent += OnAddUserHandler; OrchestratorController.Instance.OnGetUserInfoEvent += OnGetUserInfoHandler; +#if outdated_orchestrator + OrchestratorController.Instance.OnGetRoomsEvent += OnGetRoomsHandler; OrchestratorController.Instance.OnJoinRoomEvent += OnJoinRoomHandler; OrchestratorController.Instance.OnLeaveRoomEvent += OnLeaveRoomHandler; +#endif OrchestratorController.Instance.OnUserMessageReceivedEvent += OnUserMessageReceivedHandler; OrchestratorController.Instance.OnMasterEventReceivedEvent += OnMasterEventReceivedHandler; OrchestratorController.Instance.OnUserEventReceivedEvent += OnUserEventReceivedHandler; @@ -1108,9 +1111,12 @@ private void TerminateControllerEvents() OrchestratorController.Instance.OnGetUsersEvent -= OnGetUsersHandler; OrchestratorController.Instance.OnAddUserEvent -= OnAddUserHandler; OrchestratorController.Instance.OnGetUserInfoEvent -= OnGetUserInfoHandler; +#if outdated_orchestrator + OrchestratorController.Instance.OnGetRoomsEvent -= OnGetRoomsHandler; OrchestratorController.Instance.OnJoinRoomEvent -= OnJoinRoomHandler; OrchestratorController.Instance.OnLeaveRoomEvent -= OnLeaveRoomHandler; +#endif OrchestratorController.Instance.OnUserMessageReceivedEvent -= OnUserMessageReceivedHandler; OrchestratorController.Instance.OnMasterEventReceivedEvent -= OnMasterEventReceivedHandler; OrchestratorController.Instance.OnUserEventReceivedEvent -= OnUserEventReceivedHandler; @@ -1537,7 +1543,7 @@ private void OnGetLivePresenterDataHandler(LivePresenterData liveData) #endregion #endif - #region Users +#region Users private void GetUsers() { @@ -1650,6 +1656,7 @@ private void DeleteUser() } #endregion +#if outdated_orchestrator #region Rooms @@ -1686,8 +1693,8 @@ private void OnLeaveRoomHandler() } #endregion - - #region Messages +#endif +#region Messages private void SendMessage() { From 4e7ae4da63b5b5859b2dde361a009f767d51ff19 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 13:57:01 +0200 Subject: [PATCH 055/121] Rooms are gone. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 3 +++ .../API/OrchestratorWrapping/OrchestratorElements.cs | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index d044db243..3f5caadf0 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -158,10 +158,13 @@ public static OrchestratorController Instance { public Action OnGetUserInfoEvent; public Action OnAddUserEvent; +#if outdated_orchestrator + // Orchestrator Rooms Events public Action OnGetRoomsEvent; public Action OnJoinRoomEvent; public Action OnLeaveRoomEvent; +#endif // Orchestrator User Messages Events public Action OnUserMessageReceivedEvent; diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index 6a4e66718..db0b0db5e 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -149,7 +149,9 @@ public class Scenario : OrchestratorElement public string scenarioId; public string scenarioName; public string scenarioDescription; +#if outdated_orchestrator public List scenarioRooms = new List(); +#endif public JsonData scenarioGltf; public static Scenario ParseJsonData(JsonData data) @@ -158,8 +160,11 @@ public static Scenario ParseJsonData(JsonData data) scenario.scenarioId = data["scenarioId"].ToString(); scenario.scenarioName = data["scenarioName"].ToString(); scenario.scenarioDescription = data["scenarioDescription"].ToString(); +#if outdated_orchestrator + JsonData rooms = data["scenarioRooms"]; scenario.scenarioRooms = Helper.ParseElementsList(rooms); +#endif scenario.scenarioGltf = data["scenarioGltf"]; return scenario; } @@ -195,6 +200,8 @@ public override string GetGuiRepresentation() } } +#if outdated_orchestrator + public class Room : OrchestratorElement { public string roomId; @@ -238,7 +245,7 @@ public override string GetGuiRepresentation() return roomName + " (" + roomDescription + ")"; } } - +#endif public class Session : OrchestratorElement { public string sessionId; From 2f638f34517e68b4fa8f7c7e0a1f1842670a8ddf Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 14:04:13 +0200 Subject: [PATCH 056/121] gltf is gone --- .../API/OrchestratorWrapping/OrchestratorElements.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index db0b0db5e..c29976da8 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -151,9 +151,8 @@ public class Scenario : OrchestratorElement public string scenarioDescription; #if outdated_orchestrator public List scenarioRooms = new List(); -#endif public JsonData scenarioGltf; - +#endif public static Scenario ParseJsonData(JsonData data) { Scenario scenario = new Scenario(); @@ -164,8 +163,8 @@ public static Scenario ParseJsonData(JsonData data) JsonData rooms = data["scenarioRooms"]; scenario.scenarioRooms = Helper.ParseElementsList(rooms); -#endif scenario.scenarioGltf = data["scenarioGltf"]; +#endif return scenario; } From f3943c0ec76399e2a93eb657cd56286e95d76c79 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 17:24:23 +0200 Subject: [PATCH 057/121] ClearUserData and DeleteUser are gone. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 6 ++++-- .../API/OrchestratorWrapping/OrchestratorInterfaces.cs | 4 ++-- .../API/OrchestratorWrapping/OrchestratorWrapper.cs | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 3f5caadf0..7fba6bd9e 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -774,6 +774,7 @@ public void OnUpdateUserDataJsonResponse(ResponseStatus status) { if (enableLogging) Debug.Log("OrchestratorControler: OnUpdateUserDataJsonResponse: User data fully updated."); orchestratorWrapper.GetUserInfo(); } +#if outdated_orchestrator public void ClearUserData() { orchestratorWrapper.ClearUserData(); @@ -788,7 +789,7 @@ public void OnClearUserDataResponse(ResponseStatus status) { if (enableLogging) Debug.Log("OrchestratorController: OnClearUserDataResponse: User data successfully cleaned-up."); orchestratorWrapper.GetUserInfo(); } - +#endif public void GetUserInfo(string pUserID) { orchestratorWrapper.GetUserInfo(pUserID); } @@ -808,6 +809,7 @@ public void OnGetUserInfoResponse(ResponseStatus status, User user) { orchestratorWrapper.GetUsers(); } } +#if outdated_orchestrator public void DeleteUser(string pUserID) { orchestratorWrapper.DeleteUser(pUserID); @@ -824,7 +826,7 @@ public void OnDeleteUserResponse(ResponseStatus status) { // update the lists of user, anyway the result orchestratorWrapper.GetUsers(); } - +#endif #endregion #if outdated_orchestrator diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index 1b943867c..65d55cd83 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -77,10 +77,10 @@ public interface IOrchestratorResponsesListener void OnGetUserInfoResponse(ResponseStatus status, User user); void OnUpdateUserDataResponse(ResponseStatus status); void OnUpdateUserDataJsonResponse(ResponseStatus status); - void OnClearUserDataResponse(ResponseStatus status); - void OnDeleteUserResponse(ResponseStatus status); #if outdated_orchestrator + void OnClearUserDataResponse(ResponseStatus status); + void OnDeleteUserResponse(ResponseStatus status); void OnGetRoomsResponse(ResponseStatus status, List rooms); void OnJoinRoomResponse(ResponseStatus status); void OnLeaveRoomResponse(ResponseStatus status); diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index bfcc0d4c3..037be4b4a 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -495,6 +495,7 @@ private void OnUpdateUserDataJsonResponse(OrchestratorCommand command, Orchestra if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnUpdateUserDataJsonResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnUpdateUserDataJsonResponse(status); } +#if outdated_orchestrator public void ClearUserData() { @@ -502,6 +503,7 @@ public void ClearUserData() OrchestrationSocketIoManager.EmitCommand(command); } + private void OnClearUserDataResponse(OrchestratorCommand command, OrchestratorResponse response) { ResponseStatus status = new ResponseStatus(response.error, response.message); @@ -523,7 +525,6 @@ private void OnDeleteUserResponse(OrchestratorCommand command, OrchestratorRespo if (ResponsesListener != null) ResponsesListener.OnDeleteUserResponse(status); } -#if outdated_orchestrator public void GetRooms() { @@ -898,6 +899,7 @@ public void InitGrammar() new Parameter("userDataJson", typeof(string)) }, OnUpdateUserDataJsonResponse), +#if outdated_orchestrator new OrchestratorCommand("ClearUserData", null, OnClearUserDataResponse), new OrchestratorCommand("DeleteUser", new List { @@ -905,7 +907,6 @@ public void InitGrammar() }, OnDeleteUserResponse), -#if outdated_orchestrator //rooms new OrchestratorCommand("GetRooms", null, OnGetRoomsResponse), From 3b060289eef8014c3775b3ffdc3b01033c0e00c0 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 20:41:28 +0200 Subject: [PATCH 058/121] sfuLogs bite the dust. --- .../OrchestratorController.cs | 29 ++----------------- .../OrchestratorElements.cs | 4 ++- .../OrchestratorWrapper.cs | 3 +- 3 files changed, 7 insertions(+), 29 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 7fba6bd9e..37df4959c 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -90,9 +90,7 @@ public enum orchestratorConnectionStatus { // auto retrieving data on login: is used on login to chain the commands that allow to get the items available for the user (list of sessions, users, scenarios). private bool isAutoRetrievingData = false; - // Orchestrator Logs entry point where to find SFU logs of a running session. - private string orchestratorLogsDNS = "https://vrt-orch-sfu-logs.viaccess-orca.com/"; - + // Enable or disable SFU logs collection (disabled by default). private bool collectSFULogs = false; @@ -234,7 +232,6 @@ private void OnDestroy() { Debug.Log($"xxxjack OrchestratorController.OnDestroy from {gameObject.name}"); if (mySession != null) { - Collect_SFU_Logs(mySession.sessionId); #if VRT_WITH_STATS Statistics.Output("OrchestratorController", $"stopping=1, sessionId={mySession.sessionId}"); #endif @@ -346,7 +343,7 @@ public void OnLoginResponse(ResponseStatus status, string userId) { // Replaced by UpdateUserDataKey to update the IP adress field of the user on the Login. //orchestratorWrapper.GetUserInfo(); - + // xxxjack note: this has the side-effect that we get a callback with all the settings. UpdateUserDataKey("userIP", GetIPAddress()); } else { userIsLogged = false; @@ -604,8 +601,7 @@ public void OnLeaveSessionResponse(ResponseStatus status) { OnLeaveSessionEvent?.Invoke(); if (mySession != null && me != null) { - Collect_SFU_Logs(mySession.sessionId); - + // As the session creator, the session should be deleted when leaving. if (mySession.sessionAdministrator == me.userId) { if (enableLogging) Debug.Log("OrchestratorController: OnLeaveSessionResponse: As session creator, delete the current session when its empty."); @@ -1064,25 +1060,6 @@ public string GetIPAddress() { #endregion -#region Logs - - public void UpdateOrchestratorLogsDNS(string pDNS) { - if (!string.IsNullOrEmpty(pDNS)) { - orchestratorLogsDNS = pDNS; - } - } - - private void Collect_SFU_Logs(string pSessionID) { - if (!collectSFULogs) { - return; - } - - string requestURL = orchestratorLogsDNS + "?id=" + pSessionID + "&kind=sfu&download=1"; - if (enableLogging) Debug.Log("OrchestratorController: Collect_SFU_Logs: SFU session terminated, retrieving logs from: " + requestURL); - Application.OpenURL(requestURL); - } - -#endregion #region Errors diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index c29976da8..179fd724c 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -82,10 +82,12 @@ public override string GetGuiRepresentation() public class UserData: OrchestratorElement { +#if outdated_orchestrator + public string userIP = ""; public string userMQexchangeName = ""; public string userMQurl = ""; - +#endif public string userPCurl = ""; public string userAudioUrl = ""; diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 037be4b4a..38539f79b 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -465,7 +465,6 @@ private void OnGetUserInfoResponse(OrchestratorCommand command, OrchestratorResp if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnGetUserInfoResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnGetUserInfoResponse(status, user); } - public void UpdateUserData(string userDataKey, string userDataValue) { OrchestratorCommand command = GetOrchestratorCommand("UpdateUserData"); @@ -480,7 +479,6 @@ private void OnUpdateUserDataResponse(OrchestratorCommand command, OrchestratorR if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnUpdateUserDataResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnUpdateUserDataResponse(status); } - public void UpdateUserDataJson(UserData userData) { JsonData json = JsonUtility.ToJson(userData); @@ -888,6 +886,7 @@ public void InitGrammar() new Parameter("userAdmin", typeof(bool)) }, OnAddUserResponse), + new OrchestratorCommand("UpdateUserData", new List { new Parameter("userDataKey", typeof(string)), From 06287dfd5c084a7daccf2d8a3c25f6e3d4e30930 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 20:50:41 +0200 Subject: [PATCH 059/121] PushAudio gone: was replaced by data streams long ago. --- .../API/OrchestratorWrapping/OrchestratorWrapper.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 38539f79b..b8ed99085 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -623,17 +623,18 @@ private void OnGetRegisteredDataStreams(OrchestratorCommand command, Orchestrato if (ResponsesListener != null) ResponsesListener.OnGetRegisteredDataStreams(status, lDataStreams); } -#endregion + #endregion - #region commands - no Acks +#region commands - no Acks +#if outdated_orchestrator public void PushAudioPacket(byte[] pByteArray) { OrchestratorCommand command = GetOrchestratorCommand("PushAudio"); command.GetParameter("audiodata").ParamValue = pByteArray; OrchestrationSocketIoManager.EmitPacket(command); } - +#endif public void SendSceneEventPacketToMaster(byte[] pByteArray) { OrchestratorCommand command = GetOrchestratorCommand("SendSceneEventToMaster"); @@ -707,7 +708,7 @@ public void SendData(string pDataStreamType, byte[] pDataStreamBytes) OrchestrationSocketIoManager.EmitPacket(command); } - #endregion +#endregion #region remote response @@ -928,12 +929,14 @@ public void InitGrammar() new Parameter("message", typeof(string)) }, OnSendMessageToAllResponse), +#if outdated_orchestrator //audio packets new OrchestratorCommand("PushAudio", new List { new Parameter("audiodata", typeof(byte[])) }), +#endif //user events new OrchestratorCommand("SendSceneEventToMaster", new List From a23ed35edbcc0ad4f33c806748a00d387450d866 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 22:00:40 +0200 Subject: [PATCH 060/121] Got rid of unused data stream calls. --- .../OrchestratorController.cs | 5 +++-- .../OrchestratorInterfaces.cs | 2 ++ .../OrchestratorWrapping/OrchestratorWrapper.cs | 16 ++++++++++++---- .../LoginManager/Scripts/OrchestratorLogin.cs | 7 ++++--- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 37df4959c..bda1f97d3 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -967,9 +967,10 @@ public void OnUserEventReceived(UserEvent pUserEventData) { } } -#endregion + #endregion #region Data bit-stream +#if outdated_orchestrator public void GetAvailableDataStreams(string pDataStreamUserId) { OrchestratorWrapper.instance.GetAvailableDataStreams(pDataStreamUserId); @@ -994,7 +995,7 @@ public void OnGetRegisteredDataStreams(ResponseStatus status, List d } if (enableLogging) Debug.Log("OrchestratorController: OnGetRegisteredDataStreams: Registered DataStream list count: " + dataStreams.Count); } - +#endif #endregion #region Logics diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index 65d55cd83..3b2d0a041 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -88,9 +88,11 @@ public interface IOrchestratorResponsesListener void OnSendMessageResponse(ResponseStatus status); void OnSendMessageToAllResponse(ResponseStatus status); +#if outdated_orchestrator void OnGetAvailableDataStreams(ResponseStatus status, List dataStreams); void OnGetRegisteredDataStreams(ResponseStatus status, List dataStreams); +#endif } // interface to implement to be updated from messages exchanged on the socketio diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index b8ed99085..2e1d0baae 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -593,6 +593,7 @@ private void OnSendMessageToAllResponse(OrchestratorCommand command, Orchestrato if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnSendMessageToAllResponse: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnSendMessageToAllResponse(status); } +#if outdated_orchestrator public void GetAvailableDataStreams(string pDataStreamUserId) { @@ -622,8 +623,8 @@ private void OnGetRegisteredDataStreams(OrchestratorCommand command, Orchestrato if (ResponsesListener == null) Debug.LogWarning($"OrchestratorWrapper: OnGetRegisteredDataStreams: no ResponsesListener"); if (ResponsesListener != null) ResponsesListener.OnGetRegisteredDataStreams(status, lDataStreams); } - - #endregion +#endif +#endregion #region commands - no Acks @@ -671,13 +672,14 @@ public void RemoveDataStream(string pDataStreamType) command.GetParameter("dataStreamKind").ParamValue = pDataStreamType; OrchestrationSocketIoManager.EmitPacket(command); } +#if outdated_orchestrator public void RemoveAllDataStreams() { OrchestratorCommand command = GetOrchestratorCommand("RemoveAllDataStreams"); OrchestrationSocketIoManager.EmitPacket(command); } - +#endif public void RegisterForDataStream(string pDataStreamUserId, string pDataStreamType) { OrchestratorCommand command = GetOrchestratorCommand("RegisterForDataStream"); @@ -693,13 +695,14 @@ public void UnregisterFromDataStream(string pDataStreamUserId, string pDataStrea command.GetParameter("dataStreamKind").ParamValue = pDataStreamKind; OrchestrationSocketIoManager.EmitPacket(command); } +#if outdated_orchestrator public void UnregisterFromAllDataStreams() { OrchestratorCommand command = GetOrchestratorCommand("UnregisterFromAllDataStreams"); OrchestrationSocketIoManager.EmitPacket(command); } - +#endif public void SendData(string pDataStreamType, byte[] pDataStreamBytes) { OrchestratorCommand command = GetOrchestratorCommand("SendData"); @@ -963,7 +966,9 @@ public void InitGrammar() { new Parameter("dataStreamKind", typeof(string)), }), +#if outdated_orchestrator new OrchestratorCommand("RemoveAllDataStreams", null), +#endif new OrchestratorCommand("RegisterForDataStream", new List { new Parameter("dataStreamUserId", typeof(string)), @@ -974,6 +979,8 @@ public void InitGrammar() new Parameter("dataStreamUserId", typeof(string)), new Parameter("dataStreamKind", typeof(string)) }), +#if outdated_orchestrator + new OrchestratorCommand("UnregisterFromAllDataStreams", null), new OrchestratorCommand("GetAvailableDataStreams", new List { @@ -981,6 +988,7 @@ public void InitGrammar() }, OnGetAvailableDataStreams), new OrchestratorCommand("GetRegisteredDataStreams", null, OnGetRegisteredDataStreams), +#endif new OrchestratorCommand("SendData", new List { new Parameter("dataStreamKind", typeof(string)), diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 80a35255c..ae3ae47d0 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1742,7 +1742,8 @@ private void OnUserEventReceivedHandler(UserEvent pUserEventData) #endregion - #region Data Stream +#region Data Stream +#if outdated_orchestrator private void GetAvailableDataStreams() { @@ -1753,8 +1754,8 @@ private void GetRegisteredDataStreams() { OrchestratorController.Instance.GetRegisteredDataStreams(); } - - #endregion +#endif +#endregion #region Errors From bfdc4f90aa4b6d311df4a11cd5e738808acc4faf Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 23:15:22 +0200 Subject: [PATCH 061/121] More orchestrator dead wood deleted. --- .../OrchestratorController.cs | 15 +---- .../OrchestratorElements.cs | 3 +- .../OrchestratorInterfaces.cs | 2 + .../OrchestratorWrapper.cs | 20 +++--- .../LoginManager/Scripts/OrchestratorLogin.cs | 66 ++----------------- 5 files changed, 21 insertions(+), 85 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index bda1f97d3..d18c2ceb4 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -170,7 +170,6 @@ public static OrchestratorController Instance { // Orchestrator User Messages Events public Action OnMasterEventReceivedEvent; public Action OnUserEventReceivedEvent; - // Orchestrator Accessors public void LocalUserSessionForDevelopmentTests() { @@ -289,11 +288,6 @@ public void OnGetOrchestratorVersionResponse(ResponseStatus status, string versi OnGetOrchestratorVersionEvent?.Invoke(version); } - // Disconnect from the orchestrator - public void socketDisconnect() { - orchestratorWrapper.Disconnect(); - } - // SockerDisconnect response callback public void OnDisconnect() { if (enableLogging) Debug.Log($"OrchestratorController: disconnected from orchestrator"); @@ -657,9 +651,6 @@ public void OnUserLeftSession(string userID) { #region Scenarios - public void GetScenarios() { - orchestratorWrapper.GetScenarios(); - } public void OnGetScenariosResponse(ResponseStatus status, List scenarios) { if (status.Error != 0) { @@ -722,9 +713,6 @@ public void OnGetUsersResponse(ResponseStatus status, List users) { } } - public void AddUser(string pUserName, string pUserPassword, bool pAdmin = false) { - orchestratorWrapper.AddUser(pUserName, pUserPassword, pAdmin); - } public void OnAddUserResponse(ResponseStatus status, User user) { if (status.Error != 0) { @@ -966,8 +954,7 @@ public void OnUserEventReceived(UserEvent pUserEventData) { OnUserEventReceivedEvent?.Invoke(pUserEventData); } } - - #endregion +#endregion #region Data bit-stream #if outdated_orchestrator diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index 179fd724c..37ffe0ee7 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -188,8 +188,9 @@ public class ScenarioInstance : OrchestratorElement public string scenarioId; public string scenarioName; public string scenarioDescription; +#if outdated_orchestrator public List scenarioRooms = new List(); - +#endif public override string GetId() { return scenarioId; diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index 3b2d0a041..a9d3ddaa1 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -31,8 +31,10 @@ namespace VRT.Orchestrator.Wrapping public interface IUserMessagesListener { void OnUserMessageReceived(UserMessage userMessage); +#if outdated_orchestrator void OnMasterEventReceived(UserEvent pSceneEventData); void OnUserEventReceived(UserEvent pSceneEventData); +#endif } // Interface to implement to listen the user events emitted spontaneously diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 2e1d0baae..b55460399 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -22,14 +22,11 @@ // other intellectual property. using System; -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using LitJson; -using BestHTTP; using BestHTTP.SocketIO; -using BestHTTP.SocketIO.Events; using System.Text; using VRT.Orchestrator.WSManagement; @@ -114,10 +111,6 @@ public UserDataStreamPacket(string pDataStreamUserID, string pDataStreamType, st } } - //class that overrides generic UnityEvent wwith string argument - public class UnityStringEvent : UnityEvent - { - } // class that encapsulates the connection with the orchestrator, emitting and receiving the events // and converting and parsing the camands and the responses @@ -164,6 +157,7 @@ public OrchestratorWrapper(string orchestratorSocketUrl, IOrchestratorResponsesL InitGrammar(); } +#if outdated_orchestrator public OrchestratorWrapper(string orchestratorSocketUrl, IOrchestratorResponsesListener responsesListener, IUserMessagesListener messagesFromOrchestratorListener) : this(orchestratorSocketUrl, responsesListener, null, messagesFromOrchestratorListener, null) { } public OrchestratorWrapper(string orchestratorSocketUrl) : this(orchestratorSocketUrl, null, null, null, null) { } @@ -173,6 +167,7 @@ public void AddUserSessionEventLister(IUserSessionEventsListener e) } public Action OnAudioSent; +#endif public Action OnDataStreamReceived; private string myUserID = ""; @@ -725,6 +720,7 @@ private void OnMessageSentFromOrchestrator(Socket socket, Packet packet, params if (UserMessagesListener != null) UserMessagesListener.OnUserMessageReceived(messageReceived); } +#if outdated_orchestrator // audio packets from the orchestrator private void OnAudioSentFromOrchestrator(Socket socket, Packet packet, params object[] args) @@ -738,6 +734,7 @@ private void OnAudioSentFromOrchestrator(Socket socket, Packet packet, params ob OnAudioSent?.Invoke(packetReceived); } } +#endif // bit-stream packets from the orchestrator private void OnUserDataReceived(Socket socket, Packet packet, params object[] args) @@ -789,6 +786,7 @@ private void OnSessionUpdated(Socket socket, Packet packet, params object[] args break; } } +#if outdated_orchestrator // events packets from master user through the orchestrator private void OnMasterEventReceived(Socket socket, Packet packet, params object[] args) @@ -817,8 +815,8 @@ private void OnUserEventReceived(Socket socket, Packet packet, params object[] a UserMessagesListener.OnUserEventReceived(lUserEvent); } } - - #endregion +#endif +#endregion #region grammar definition // declare te available commands, their parameters and the callbacks that should be used for the response of each command @@ -1001,12 +999,16 @@ public void InitGrammar() //messages new OrchestratorMessageReceiver("MessageSent", OnMessageSentFromOrchestrator), //audio packets +#if outdated_orchestrator new OrchestratorMessageReceiver("AudioSent", OnAudioSentFromOrchestrator), +#endif //session update events new OrchestratorMessageReceiver("SessionUpdated", OnSessionUpdated), //user events +#if outdated_orchestrator new OrchestratorMessageReceiver("SceneEventToMaster", OnMasterEventReceived), new OrchestratorMessageReceiver("SceneEventToUser", OnUserEventReceived), +#endif //user bit-stream new OrchestratorMessageReceiver("DataReceived", OnUserDataReceived) }; diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index ae3ae47d0..8a47bae81 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1,16 +1,12 @@ using System; -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; -using UnityEngine.SceneManagement; using UnityEngine.InputSystem; -using UnityEditor; using VRT.Orchestrator.Wrapping; using VRT.UserRepresentation.Voice; using VRT.Core; -using Cwipc; using VRT.Pilots.Common; namespace VRT.Pilots.LoginManager @@ -33,8 +29,6 @@ public class OrchestratorLogin : MonoBehaviour private static OrchestratorLogin instance; - public static OrchestratorLogin Instance { get { return instance; } } - #region GUI Components [Tooltip("This user is the master of the session")] @@ -1073,7 +1067,6 @@ private void InitialiseControllerEvents() OrchestratorController.Instance.OnAddUserEvent += OnAddUserHandler; OrchestratorController.Instance.OnGetUserInfoEvent += OnGetUserInfoHandler; #if outdated_orchestrator - OrchestratorController.Instance.OnGetRoomsEvent += OnGetRoomsHandler; OrchestratorController.Instance.OnJoinRoomEvent += OnJoinRoomHandler; OrchestratorController.Instance.OnLeaveRoomEvent += OnLeaveRoomHandler; @@ -1169,11 +1162,6 @@ private void OnConnecting() statusText.color = connectingCol; } - private void socketDisconnect() - { - OrchestratorController.Instance.socketDisconnect(); - } - private void OnDisconnect(bool pConnected) { if (!pConnected) @@ -1313,11 +1301,6 @@ private void OnLogout(bool userLogoutSucessfully) #region NTP clock - private void GetNTPTime() - { - OrchestratorController.Instance.GetNTPTime(); - } - private void OnGetNTPTimeResponse(NtpClock ntpTime) { double difference = Helper.GetClockTimestamp(DateTime.UtcNow) - ntpTime.Timestamp; @@ -1426,11 +1409,6 @@ private void OnGetScenarioInstanceInfoHandler(ScenarioInstance scenario) } } - private void DeleteSession() - { - OrchestratorController.Instance.DeleteSession(OrchestratorController.Instance.MySession.sessionId); - } - private void OnDeleteSessionHandler() { if (developerMode) Debug.Log("OrchestratorLogin: OnDeleteSessionHandler: Session deleted"); @@ -1513,11 +1491,6 @@ private void OnUserLeftSessionHandler(string userID) #region Scenarios - private void GetScenarios() - { - OrchestratorController.Instance.GetScenarios(); - } - private void OnGetScenariosHandler(Scenario[] scenarios) { if (scenarios != null && scenarios.Length > 0) @@ -1573,12 +1546,6 @@ private void OnGetUsersHandler(User[] users) UpdateUsersSession(usersSession); } - private void AddUser() - { - if (developerMode) Debug.Log("OrchestratorLogin: AddUser: Send AddUser registration for user " + userNameRegisterIF.text); - OrchestratorController.Instance.AddUser(userNameRegisterIF.text, userPasswordRegisterIF.text); - } - private void OnAddUserHandler(User user) { if (developerMode) Debug.Log("OrchestratorLogin: OnAddUserHandler: User " + user.userName + " registered with exit."); @@ -1649,13 +1616,14 @@ private void OnGetUserInfoHandler(User user) } } } +#if outdated_orchestrator private void DeleteUser() { Debug.LogError("OrchestratorLogin: DeleteUser: Not implemented"); } - - #endregion +#endif +#endregion #if outdated_orchestrator #region Rooms @@ -1696,10 +1664,6 @@ private void OnLeaveRoomHandler() #endif #region Messages - private void SendMessage() - { - Debug.LogError("OrchestratorLogin: SendMessage: Not implemented"); - } private void SendMessageToAll(string message) { @@ -1713,23 +1677,6 @@ private void OnUserMessageReceivedHandler(UserMessage userMessage) #endregion - #region Events - - private void SendEventToMaster() - { - Debug.LogError("OrchestratorLogin: SendEventToMaster: Not implemented"); - } - - private void SendEventToUser() - { - Debug.LogError("OrchestratorLogin: SendEventToUser: Not implemented"); - } - - private void SendEventToAll() - { - Debug.LogError("OrchestratorLogin: SendEventToAll: Not implemented"); - } - private void OnMasterEventReceivedHandler(UserEvent pMasterEventData) { Debug.LogError("OrchestratorLogin: OnMasterEventReceivedHandler: Unexpected message from " + pMasterEventData.fromId + ": " + pMasterEventData.message); @@ -1739,8 +1686,7 @@ private void OnUserEventReceivedHandler(UserEvent pUserEventData) { Debug.LogError("OrchestratorLogin: OnUserEventReceivedHandler: Unexpected message from " + pUserEventData.fromId + ": " + pUserEventData.message); } - - #endregion +#endregion #region Data Stream #if outdated_orchestrator @@ -1757,7 +1703,7 @@ private void GetRegisteredDataStreams() #endif #endregion - #region Errors +#region Errors private void OnErrorHandler(ResponseStatus status) { @@ -1765,8 +1711,6 @@ private void OnErrorHandler(ResponseStatus status) ErrorManager.Instance.EnqueueOrchestratorError(status.Error, status.Message); } - #endregion - #endregion } From 546d4446d479d8d48365633af72886f159f9e215 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 23:45:59 +0200 Subject: [PATCH 062/121] UserData is now also optionally stored in a local file. --- .../OrchestratorWrapping/OrchestratorElements.cs | 10 ++++++++++ .../Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- .../LoginManager/Scripts/OrchestratorLogin.cs | 9 +++++++++ Assets/VRTCore/VRTConfig.cs | 14 +++++++++----- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs index 37ffe0ee7..c9ed72e82 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorElements.cs @@ -98,6 +98,16 @@ public class UserData: OrchestratorElement // empty constructor callled by the JsonData parser public UserData() { } + + public static UserData ParseJsonData(JsonData data) + { + return JsonMapper.ToObject(data.ToJson()); + } + + public string AsJsonString() + { + return JsonMapper.ToJson(this); + } } public class SfuData : OrchestratorElement diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 111c2886f..e71a4dc88 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:237f3d988e30e3267b49100b07f55aeae404819a395c165d7a6352ea1b62df2e -size 47992 +oid sha256:d0c63ac3d81866c43ff9479e8601537e41c7b1533155779c1f9620d2007d1d7c +size 48041 diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 8a47bae81..d21a038df 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1565,7 +1565,16 @@ private void UpdateUserData() webcamName = (webcamDropdown.options.Count <= 0) ? "None" : webcamDropdown.options[webcamDropdown.value].text, microphoneName = (microphoneDropdown.options.Count <= 0) ? "None" : microphoneDropdown.options[microphoneDropdown.value].text }; + // Send new UserData to the orchestrator OrchestratorController.Instance.UpdateFullUserData(lUserData); + // And also save a local copy, if wanted + if (!String.IsNullOrEmpty(VRTConfig.Instance.LocalUser.orchestratorConfigFilename)) + { + var configData = lUserData.AsJsonString(); + var fullName = VRTConfig.ConfigFilename(VRTConfig.Instance.LocalUser.orchestratorConfigFilename); + System.IO.File.WriteAllText(fullName, configData); + Debug.Log($"OrchestratorLogin: saved UserData to {fullName}"); + } } private void GetUserInfo() diff --git a/Assets/VRTCore/VRTConfig.cs b/Assets/VRTCore/VRTConfig.cs index 7c935e218..493531e1f 100644 --- a/Assets/VRTCore/VRTConfig.cs +++ b/Assets/VRTCore/VRTConfig.cs @@ -122,6 +122,8 @@ public class _Synchronizer [Serializable] public class _User { + [Tooltip("local filename where orchestrator config is stored")] + public string orchestratorConfigFilename; [Serializable] public class _PCSelfConfig { @@ -284,13 +286,15 @@ static string _ConfigFilenameFromCommandLineArgs() public static string ConfigFilename(string filename="config.json") { - string clConfigFile = _ConfigFilenameFromCommandLineArgs(); - if (clConfigFile != null) + if (filename == "config.json") { - clConfigFile = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), clConfigFile); - return clConfigFile; + string clConfigFile = _ConfigFilenameFromCommandLineArgs(); + if (clConfigFile != null) + { + clConfigFile = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), clConfigFile); + return clConfigFile; + } } - string dataPath; if (Application.isEditor) { From a2ab8e547911fac7ec579b590573040776101196 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 15 Aug 2023 23:54:56 +0200 Subject: [PATCH 063/121] Getting started on loading orchestrator UserData. Unfinished. --- .../Pilots/LoginManager/Scripts/OrchestratorLogin.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index d21a038df..4574eca13 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1242,6 +1242,18 @@ private void OnLogin(bool userLoggedSucessfully) { if (userLoggedSucessfully) { + // Load locally save user data for orchestrator, if wanted + if (!String.IsNullOrEmpty(VRTConfig.Instance.LocalUser.orchestratorConfigFilename)) + { + var fullName = VRTConfig.ConfigFilename(VRTConfig.Instance.LocalUser.orchestratorConfigFilename); + if (System.IO.File.Exists(fullName)) + { + Debug.Log($"OrchestratorLogin: load UserData from {fullName}"); + var configData = System.IO.File.ReadAllText(fullName); + // xxxjack UserData lUserData = UserData.ParseJsonData(configData); + } + } + OrchestratorController.Instance.StartRetrievingData(); // UserData info in Login From 035f6054da13d800618063781a0e11f66f305e54 Mon Sep 17 00:00:00 2001 From: "Topinambur\\dis" Date: Wed, 16 Aug 2023 17:07:29 +0200 Subject: [PATCH 064/121] Turned an error into a log message. --- Assets/VRTCore/VRTSynchronizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/VRTCore/VRTSynchronizer.cs b/Assets/VRTCore/VRTSynchronizer.cs index 33c4bd254..573b8e280 100644 --- a/Assets/VRTCore/VRTSynchronizer.cs +++ b/Assets/VRTCore/VRTSynchronizer.cs @@ -86,7 +86,7 @@ public void SetAudioTimestampRangeForCurrentFrame(string caller, Timestamp earli { if (audioTimestampRange != null) { - Debug.LogError($"{Name()}: {caller}: Duplicate SetAudioTimestampRangeForCurrentFrame call"); + Debug.Log($"{Name()}: {caller}: Duplicate SetAudioTimestampRangeForCurrentFrame call, was {audioTimestampRange} now {earliestFrameTimestamp}..{latestFrameTimestamp}"); } audioTimestampRange = new TimestampRange() { From a3fdeb9be5a1fba96629b30c5d64a34fb58d9f04 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 17 Aug 2023 23:23:32 +0200 Subject: [PATCH 065/121] Stop and unload XR on the mac. This fixes the issue that mouse UI input wasn't working on the mac since Unity 2021.3.28. Partial fix for #109. --- Assets/VRTInitializer/VRTInitializer.asmdef | 3 ++- Assets/VRTInitializer/VRTInitializer.cs | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Assets/VRTInitializer/VRTInitializer.asmdef b/Assets/VRTInitializer/VRTInitializer.asmdef index 8b49a2496..c0d745440 100644 --- a/Assets/VRTInitializer/VRTInitializer.asmdef +++ b/Assets/VRTInitializer/VRTInitializer.asmdef @@ -8,7 +8,8 @@ "PointClouds", "WebCam", "Pilots", - "Unity.InputSystem" + "Unity.InputSystem", + "Unity.XR.Management" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/VRTInitializer/VRTInitializer.cs b/Assets/VRTInitializer/VRTInitializer.cs index 1c9836cef..2fd5e5b7f 100644 --- a/Assets/VRTInitializer/VRTInitializer.cs +++ b/Assets/VRTInitializer/VRTInitializer.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.XR.Management; using VRT.UserRepresentation.PointCloud; using VRT.UserRepresentation.WebCam; using VRT.Core; @@ -34,7 +35,20 @@ private void OnApplicationQuit() private void Start() { Debug.Log("Initializer: Start"); +#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX + if (XRGeneralSettings.Instance.Manager.activeLoader != null) + { + XRGeneralSettings.Instance.Manager.StopSubsystems(); + XRGeneralSettings.Instance.Manager.DeinitializeLoader(); + Debug.LogWarning("VRTInitializer: de-initialize XR on Mac to work around bug"); + } + else + { + Debug.Log("VRTInitializer: XR was not enabled"); + } +#endif } + // Update is called once per frame void Update() { From 58cef17cec7f774f84f13a7c7083103a2343ee6a Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 20 Aug 2023 23:01:52 +0200 Subject: [PATCH 066/121] Slightly better log message. --- Assets/VRTInitializer/VRTInitializer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/VRTInitializer/VRTInitializer.cs b/Assets/VRTInitializer/VRTInitializer.cs index 2fd5e5b7f..763373243 100644 --- a/Assets/VRTInitializer/VRTInitializer.cs +++ b/Assets/VRTInitializer/VRTInitializer.cs @@ -17,7 +17,7 @@ public class VRTInitializer : MonoBehaviour // Start is called before the first frame update void Awake() { - Debug.Log("Initializer: Registering pipelines"); + Debug.Log("VRTInitializer: Registering pipelines"); PointCloudPipelineSelf.Register(); PointCloudPipelineOther.Register(); WebCamPipeline.Register(); @@ -34,7 +34,7 @@ private void OnApplicationQuit() private void Start() { - Debug.Log("Initializer: Start"); + Debug.Log("VRTInitializer: Start"); #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX if (XRGeneralSettings.Instance.Manager.activeLoader != null) { From da710a99327de6dc1e4705b486562837d0b5e81d Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 21 Aug 2023 14:37:38 +0200 Subject: [PATCH 067/121] Attempting to fix sending pointclouds to orchestrator udring settings interaction --- .../SocketIO/Workers/Readers/AsyncSocketIOReader.cs | 7 +++++-- config.json | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs b/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs index 4762de482..68ec9ba33 100644 --- a/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs +++ b/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs @@ -39,7 +39,7 @@ public AsyncSocketIOReader(User user, string remoteStream, string fourcc, Incomi for (int i = 0; i < this.descriptors.Length; ++i) { this.descriptors[i].name = $"{user.userId}.{remoteStream}.{fourcc}#{i}"; - Debug.Log($"[FPA] RegisterForDataStream userId {user.userId} StreamType {this.descriptors[i].name}"); + Debug.Log($"{Name()}: RegisterForDataStream userId {user.userId} StreamName {this.descriptors[i].name}"); OrchestratorWrapper.instance.RegisterForDataStream(user.userId, this.descriptors[i].name); } OrchestratorWrapper.instance.OnDataStreamReceived += OnDataPacketReceived; @@ -104,7 +104,10 @@ private void OnDataPacketReceived(UserDataStreamPacket pPacket) bool didDrop = !descriptors[i].outQueue.Enqueue(chunk); if (didDrop) { - // Debug.Log($"{Name()}: dropped packet, queuelength is {descriptors[i].outQueue.Count()}"); + Debug.Log($"{Name()}: dropped packet for {streamName}, ts={timestamp}, queuelength is {descriptors[i].outQueue.Count()}"); + } else + { + Debug.Log($"{Name()}: Received packet for {streamName}, ts={timestamp}, size={chunk.length}"); } #if VRT_WITH_STATS stats.statsUpdate(chunk.length, didDrop, timestamp, i); diff --git a/config.json b/config.json index 83541eca8..5069ef21a 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,6 @@ { - "_unused_orchestratorURL" : "http://www.jackjansen.nl:8080/socket.io/", - "statsOutputFile" : "-", + "_orchestratorURL" : "http://sap.local:8080/socket.io/", + "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, "sessionName" : "jack-grab", @@ -19,7 +19,7 @@ "LocalUser": { "PCSelfConfig": { - "capturerTypeName" : "auto", + "capturerTypeName" : "synthetic", "RS2ReaderConfig": { "configFilename": "./cameraconfig.json" }, From bf2fa81223c15ade33b1e7fe3a120378d2145326 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 21 Aug 2023 14:42:01 +0200 Subject: [PATCH 068/121] Another attempt at fixing forwarding data to orchestrator when not needed. --- .../Common/Prefabs/01_Player/P_Self_Login.prefab | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Login.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Login.prefab index 470b190f1..382f9afed 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Login.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Login.prefab @@ -12,6 +12,16 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_PositionInput.m_Action.m_Id + value: + objectReference: {fileID: 0} + - target: {fileID: 364752266897929616, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: m_RotationInput.m_Action.m_Id + value: + objectReference: {fileID: 0} - target: {fileID: 748432237038051979, guid: fceec8934b5ae4fdaa36454e0b30346f, type: 3} propertyPath: m_Name @@ -77,6 +87,11 @@ PrefabInstance: propertyPath: m_Enabled value: 0 objectReference: {fileID: 0} + - target: {fileID: 1246181775895122469, guid: fceec8934b5ae4fdaa36454e0b30346f, + type: 3} + propertyPath: previewPlayer + value: 1 + objectReference: {fileID: 0} - target: {fileID: 1935332283100515003, guid: fceec8934b5ae4fdaa36454e0b30346f, type: 3} propertyPath: m_Name From 71042103151a79d5501f0f8a3bf1b5e56286146a Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 22 Aug 2023 01:11:17 +0200 Subject: [PATCH 069/121] Fixing various debug and stats messages to show more information. --- .../OrchestratorController.cs | 15 ++++++++------- .../OrchestratorControllerExtensions.cs | 1 + .../Common/Players/SessionPlayersManager.cs | 7 ++++++- config.json | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index d18c2ceb4..5cc801409 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -467,14 +467,15 @@ public void OnAddSessionResponse(ResponseStatus status, Session session) { } if (enableLogging) Debug.Log("OrchestratorController: OnAddSessionResponse: Session " + session.sessionName + " successfully created by " + GetUser(session.sessionAdministrator).userName + "."); -#if VRT_WITH_STATS - Statistics.Output("OrchestratorController", $"created=1, sessionId={session.sessionId}, sessionName={session.sessionName}"); -#endif // success mySession = session; userIsMaster = session.sessionMaster == me.userId; connectedUsers = ExtractConnectedUsers(session.sessionUsers); +#if VRT_WITH_STATS + Statistics.Output("OrchestratorController", $"created=1, sessionId={session.sessionId}, sessionName={session.sessionName}, isMaster={(userIsMaster?1:0)}, nUser={connectedUsers.Count}"); +#endif + availableSessions.Add(session); OnAddSessionEvent?.Invoke(session); @@ -499,12 +500,12 @@ public void OnGetSessionInfoResponse(ResponseStatus status, Session session) { return; } - if (enableLogging) Debug.Log("OrchestratorController: OnGetSessionInfoResponse: Get session info of " + session.sessionName + "."); - + // success mySession = session; userIsMaster = session.sessionMaster == me.userId; connectedUsers = ExtractConnectedUsers(session.sessionUsers); + if (enableLogging) Debug.Log($"OrchestratorController: OnGetSessionInfoResponse: Get session info of {session.sessionName}, isMaster={(userIsMaster)}, nUser={connectedUsers.Count}"); OnSessionInfoEvent?.Invoke(session); } @@ -555,12 +556,12 @@ public void OnJoinSessionResponse(ResponseStatus status, Session session) { return; } - if (enableLogging) Debug.Log("OrchestratorController: OnJoinSessionResponse: Session " + session.sessionName + " succesfully joined."); - + // success mySession = session; userIsMaster = session.sessionMaster == me.userId; connectedUsers = ExtractConnectedUsers(session.sessionUsers); + if (enableLogging) Debug.Log($"OrchestratorController: OnJoinSessionResponse: Session {session.sessionName}, isMaster={(userIsMaster)}, nUser={connectedUsers.Count}"); // Simulate user join a session for each connected users foreach (string id in session.sessionUsers) { diff --git a/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs b/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs index 522357491..167220178 100644 --- a/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs +++ b/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs @@ -129,6 +129,7 @@ public static void SendTypeEventToUser(this OrchestratorController controller { if (controller == null) { + Debug.LogWarning("OrchestratorControllerExtensions: SendTypeEventToUser: controller==null"); return; } if (controller.SelfUser == null) diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index be6a10a2b..e0335ff8a 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -174,7 +174,8 @@ public void InstantiatePlayers() } } - if (!OrchestratorController.Instance.UserIsMaster) + + if (!OrchestratorController.Instance.UserIsMaster) { OrchestratorController.Instance.SendTypeEventToMaster(new PlayerLocationDataRequest()); } @@ -221,6 +222,10 @@ private void AddPlayer(PlayerNetworkControllerBase player) //No need to send anything if it's just us SendPlayerLocationData(); } + else + { + Debug.Log($"SessionPlayersManager: single-user session, not forwarding location data"); + } } } diff --git a/config.json b/config.json index 5069ef21a..c69f5673f 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "_orchestratorURL" : "http://sap.local:8080/socket.io/", + "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, From 2f11f9b76d1d3c6a099156526f82068941d29463 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 22 Aug 2023 13:42:14 +0200 Subject: [PATCH 070/121] Commit bfdc4f90 inadvertantly removed the in-session event forwarding. Reverted that bit. --- .../API/OrchestratorWrapping/OrchestratorInterfaces.cs | 2 -- .../API/OrchestratorWrapping/OrchestratorWrapper.cs | 4 ---- 2 files changed, 6 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs index a9d3ddaa1..3b2d0a041 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorInterfaces.cs @@ -31,10 +31,8 @@ namespace VRT.Orchestrator.Wrapping public interface IUserMessagesListener { void OnUserMessageReceived(UserMessage userMessage); -#if outdated_orchestrator void OnMasterEventReceived(UserEvent pSceneEventData); void OnUserEventReceived(UserEvent pSceneEventData); -#endif } // Interface to implement to listen the user events emitted spontaneously diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index b55460399..4535a7536 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -786,7 +786,6 @@ private void OnSessionUpdated(Socket socket, Packet packet, params object[] args break; } } -#if outdated_orchestrator // events packets from master user through the orchestrator private void OnMasterEventReceived(Socket socket, Packet packet, params object[] args) @@ -815,7 +814,6 @@ private void OnUserEventReceived(Socket socket, Packet packet, params object[] a UserMessagesListener.OnUserEventReceived(lUserEvent); } } -#endif #endregion #region grammar definition @@ -1005,10 +1003,8 @@ public void InitGrammar() //session update events new OrchestratorMessageReceiver("SessionUpdated", OnSessionUpdated), //user events -#if outdated_orchestrator new OrchestratorMessageReceiver("SceneEventToMaster", OnMasterEventReceived), new OrchestratorMessageReceiver("SceneEventToUser", OnUserEventReceived), -#endif //user bit-stream new OrchestratorMessageReceiver("DataReceived", OnUserDataReceived) }; From 8dd2f1717bb2a3dd96aaed0d246a18b76391c502 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 22 Aug 2023 14:13:45 +0200 Subject: [PATCH 071/121] Removed debug. --- .../Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs b/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs index 68ec9ba33..2499f3fb7 100644 --- a/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs +++ b/Assets/Transport/SocketIO/Workers/Readers/AsyncSocketIOReader.cs @@ -107,7 +107,7 @@ private void OnDataPacketReceived(UserDataStreamPacket pPacket) Debug.Log($"{Name()}: dropped packet for {streamName}, ts={timestamp}, queuelength is {descriptors[i].outQueue.Count()}"); } else { - Debug.Log($"{Name()}: Received packet for {streamName}, ts={timestamp}, size={chunk.length}"); + // Debug.Log($"{Name()}: Received packet for {streamName}, ts={timestamp}, size={chunk.length}"); } #if VRT_WITH_STATS stats.statsUpdate(chunk.length, didDrop, timestamp, i); From 0113d53f3dfcd36a1ca81490c47e2ecea8fd0d93 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 22 Aug 2023 16:18:43 +0200 Subject: [PATCH 072/121] Added sessionProtocol parameter to AddSession. The new orchestrator will use this to create the correct SFU for the session. --- .../OrchestratorController.cs | 4 ++-- .../OrchestratorWrapping/OrchestratorWrapper.cs | 6 ++++-- .../LoginManager/Scripts/OrchestratorLogin.cs | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 5cc801409..9b5029bfc 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -455,8 +455,8 @@ public void OnGetSessionsResponse(ResponseStatus status, List sessions) } } - public void AddSession(string pSessionID, string pSessionName, string pSessionDescription) { - orchestratorWrapper.AddSession(pSessionID, pSessionName, pSessionDescription); + public void AddSession(string pScenarioID, string pSessionName, string pSessionDescription, string pSessionProtocol) { + orchestratorWrapper.AddSession(pScenarioID, pSessionName, pSessionDescription, pSessionProtocol); } public void OnAddSessionResponse(ResponseStatus status, Session session) { diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 4535a7536..df377af2e 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -281,12 +281,13 @@ private void OnGetNTPTimeResponse(OrchestratorCommand command, OrchestratorRespo if (ResponsesListener != null)ResponsesListener.OnGetNTPTimeResponse(status, ntpTime); } - public void AddSession(string scenarioId, string sessionName, string sessionDescription) + public void AddSession(string scenarioId, string sessionName, string sessionDescription, string sessionProtocol) { OrchestratorCommand command = GetOrchestratorCommand("AddSession"); command.GetParameter("scenarioId").ParamValue = scenarioId; command.GetParameter("sessionName").ParamValue = sessionName; command.GetParameter("sessionDescription").ParamValue = sessionDescription; + command.GetParameter("sessionProtocol").ParamValue = sessionProtocol; OrchestrationSocketIoManager.EmitCommand(command); } @@ -840,7 +841,8 @@ public void InitGrammar() { new Parameter("scenarioId", typeof(string)), new Parameter("sessionName", typeof(string)), - new Parameter("sessionDescription", typeof(string)) + new Parameter("sessionDescription", typeof(string)), + new Parameter("sessionProtocol", typeof(string)), }, OnAddSessionResponse), new OrchestratorCommand("GetSessions", null, OnGetSessionsResponse), diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 4574eca13..c01aa8a2f 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1346,9 +1346,23 @@ private void OnSessionsHandler(Session[] sessions) private void AddSession() { + string protocol = ""; + switch(SessionConfig.Instance.protocolType) + { + case SessionConfig.ProtocolType.SocketIO: + protocol = "socketio"; + break; + case SessionConfig.ProtocolType.Dash: + protocol = "dash"; + break; + case SessionConfig.ProtocolType.TCP: + protocol = "tcp"; + break; + } OrchestratorController.Instance.AddSession(scenarioIDs[scenarioIdDrop.value], sessionNameIF.text, - sessionDescriptionIF.text); + sessionDescriptionIF.text, + protocol); } private void OnAddSessionHandler(Session session) From 083014631f39eb6f1028e901e57a644bf7b5f4a7 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 23 Aug 2023 11:37:38 +0200 Subject: [PATCH 073/121] Don't create orchestrator user config file. --- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index e71a4dc88..a0d4c4690 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0c63ac3d81866c43ff9479e8601537e41c7b1533155779c1f9620d2007d1d7c -size 48041 +oid sha256:97527d776b7fcdc9ceee18e3803fd1aa40c3b042ee3ccf877c23d4179e4c3f08 +size 48025 From 2d82a4e370c0e96c1c4900e1c36ad9411a148dfe Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 23 Aug 2023 11:39:24 +0200 Subject: [PATCH 074/121] Don't use Jack's home orchestrator. --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index c69f5673f..5069ef21a 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "orchestratorURL" : "http://sap.local:8080/socket.io/", + "_orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, From ca6a8671e4940a97b094d583f20296a675523f66 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 23 Aug 2023 14:25:54 +0200 Subject: [PATCH 075/121] Added log messages to help with debugging scene transitions. --- Assets/Pilots/Common/Controllers/PilotController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/Pilots/Common/Controllers/PilotController.cs b/Assets/Pilots/Common/Controllers/PilotController.cs index 949067e13..dd3926964 100644 --- a/Assets/Pilots/Common/Controllers/PilotController.cs +++ b/Assets/Pilots/Common/Controllers/PilotController.cs @@ -49,6 +49,7 @@ public virtual void Awake() Debug.LogError("PilotController: multiple PilotController (subclass) instances in scene"); } Instance = this; + Debug.Log($"{Name()}: Awake."); } /// @@ -86,6 +87,7 @@ public void EnableDirectInteraction() // Start is called before the first frame update public virtual void Start() { + Debug.Log($"{Name()}: Started."); if(CameraFader.Instance != null) { CameraFader.Instance.StartFadeIn(); @@ -102,14 +104,16 @@ public void LoadNewScene(string newScene) } else { + Debug.Log($"{Name()}: Loading new scene {newScene}"); SceneManager.LoadScene(newScene); } } protected IEnumerator LoadSceneAfterFade(float fadeDuration, string newScene) { - + Debug.Log($"{Name()}: Fading out for transition to {newScene}"); yield return new WaitForSeconds(fadeDuration + 0.2f); + Debug.Log($"{Name()}: Loading new scene {newScene}"); SceneManager.LoadScene(newScene); } From ae3defd9b40f4e673172722a0aef7239354e4f6d Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 23 Aug 2023 15:25:27 +0200 Subject: [PATCH 076/121] Attempt at fixing #110 by adding an extra delay in scene transition _for the master user only_. --- .../Pilots/LoginManager/Scripts/LoginController.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Assets/Pilots/LoginManager/Scripts/LoginController.cs b/Assets/Pilots/LoginManager/Scripts/LoginController.cs index 855f00bba..325b86d63 100644 --- a/Assets/Pilots/LoginManager/Scripts/LoginController.cs +++ b/Assets/Pilots/LoginManager/Scripts/LoginController.cs @@ -39,7 +39,18 @@ IEnumerator RefreshAndLoad(string scenary) { yield return null; OrchestratorController.Instance.GetUsers(); - yield return new WaitForSeconds(0.5f); + if (OrchestratorController.Instance.UserIsMaster) + { + // xxxjack this is a terrible hack to forestall the initial messages frmm the master to the + // other participants in the session getting lost: the master waits longer before transitioning to + // the new scene. + // This problem suddelny started appearing late August 2023. No idea why it was never a problem before. + yield return new WaitForSeconds(1.5f); + } + else + { + yield return new WaitForSeconds(0.1f); + } LoadNewScene(scenary); } From 21854023faf2635f927ec3b316606b9931c7dcf0 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 23 Aug 2023 23:54:48 +0200 Subject: [PATCH 077/121] Another attempt at fixing the startup issue of #110: get rid of delaying the master startup of the session, in stead start it up everywhere as quickly as possible. In stead delay the instantiating of the players in the new scene. --- .../Common/Players/SessionPlayersManager.cs | 9 +++++++++ .../LoginManager/Scripts/LoginController.cs | 16 ++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index e0335ff8a..c3bae6bad 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR; @@ -45,6 +46,8 @@ public PlayerLocationData(int numPlayers) public List PlayerLocations; [Tooltip("Location where no-representation players will be instantiated")] public Transform NonPlayersLocation; + [Tooltip("Delay between Start() and InstantiatePlayers()")] + public float InstantiatePlayersDelay = 2.0f; [Tooltip("If true, the players will be put on the available locations in order of appearance in the Player Locations list")] public bool AutoSpawnOnLocation = false; @@ -101,6 +104,12 @@ public void OnDestroy() public void Start() { + StartCoroutine(InstantiatePlayersAfterDelay()); + } + + protected IEnumerator InstantiatePlayersAfterDelay() + { + yield return new WaitForSeconds(InstantiatePlayersDelay); InstantiatePlayers(); } diff --git a/Assets/Pilots/LoginManager/Scripts/LoginController.cs b/Assets/Pilots/LoginManager/Scripts/LoginController.cs index 325b86d63..2667401ad 100644 --- a/Assets/Pilots/LoginManager/Scripts/LoginController.cs +++ b/Assets/Pilots/LoginManager/Scripts/LoginController.cs @@ -39,18 +39,10 @@ IEnumerator RefreshAndLoad(string scenary) { yield return null; OrchestratorController.Instance.GetUsers(); - if (OrchestratorController.Instance.UserIsMaster) - { - // xxxjack this is a terrible hack to forestall the initial messages frmm the master to the - // other participants in the session getting lost: the master waits longer before transitioning to - // the new scene. - // This problem suddelny started appearing late August 2023. No idea why it was never a problem before. - yield return new WaitForSeconds(1.5f); - } - else - { - yield return new WaitForSeconds(0.1f); - } + // The OrchestratorController is in DontDestroyOnLoad, so we don't have to wait for the GetUsers + // response before loading the next scene (as long as we don't start acting on the data until the resonse has + // been received). + yield return null; LoadNewScene(scenary); } From b45059a4e8b1727bd5a76ade38f9565f688a8603 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 24 Aug 2023 13:38:42 +0200 Subject: [PATCH 078/121] Use tool_scenesetup_mediascape, disable old scene infrastructure. --- Assets/PilotsExternal/mediaScape | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/PilotsExternal/mediaScape b/Assets/PilotsExternal/mediaScape index 397aa959f..bf78220be 160000 --- a/Assets/PilotsExternal/mediaScape +++ b/Assets/PilotsExternal/mediaScape @@ -1 +1 @@ -Subproject commit 397aa959fd8f1d9359adf1440d801c87c2eaa6ec +Subproject commit bf78220be0ba2dae0dee66bd4d5ba44c081b95ad From 39438363703f04b7344e582bd0d638e9ed6c3e90 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 24 Aug 2023 14:13:08 +0200 Subject: [PATCH 079/121] Use tool_scenesetup_mediascape, disable old scene infrastructure. --- Assets/PilotsExternal/mediaScape | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/PilotsExternal/mediaScape b/Assets/PilotsExternal/mediaScape index bf78220be..905f76f75 160000 --- a/Assets/PilotsExternal/mediaScape +++ b/Assets/PilotsExternal/mediaScape @@ -1 +1 @@ -Subproject commit bf78220be0ba2dae0dee66bd4d5ba44c081b95ad +Subproject commit 905f76f756c04e87eec6ec9c0be67650f6026c4f From 4649eeb453993add7c5552854b740f5b92cdca27 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 24 Aug 2023 14:31:40 +0200 Subject: [PATCH 080/121] Found two more Input Action references that weren't a reference, and could therefore trigger bug #104. Fixed. Backport candidate. --- .../Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab index c2064d9e2..847db1116 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab @@ -162,7 +162,7 @@ MonoBehaviour: m_GravityApplicationMode: 0 m_ForwardSource: {fileID: 7845086807825369409} m_LeftHandMoveAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Left Hand Move m_Type: 0 @@ -1720,7 +1720,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7004479241362984629} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0bf296fc962d7184ab14ad1841598d5f, type: 3} m_Name: @@ -1733,7 +1733,7 @@ MonoBehaviour: m_GravityApplicationMode: 0 m_ForwardSource: {fileID: 7845086807825369409} m_LeftHandMoveAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Left Hand Move m_Type: 0 @@ -1743,7 +1743,8 @@ MonoBehaviour: m_Interactions: m_SingletonActionBindings: [] m_Flags: 0 - m_Reference: {fileID: 0} + m_Reference: {fileID: 6972639530819350904, guid: 721820db5472c4cdb9e2c49de50d8533, + type: 3} m_RightHandMoveAction: m_UseReference: 1 m_Action: From 2e4df6db816e96450f24f4263a2f11b5f1290b22 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Thu, 24 Aug 2023 14:31:40 +0200 Subject: [PATCH 081/121] Found two more Input Action references that weren't a reference, and could therefore trigger bug #104. Fixed. Backport candidate. --- .../Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab index c2064d9e2..847db1116 100644 --- a/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab +++ b/Assets/Pilots/Common/Prefabs/01_Player/P_Self_Player.prefab @@ -162,7 +162,7 @@ MonoBehaviour: m_GravityApplicationMode: 0 m_ForwardSource: {fileID: 7845086807825369409} m_LeftHandMoveAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Left Hand Move m_Type: 0 @@ -1720,7 +1720,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7004479241362984629} - m_Enabled: 1 + m_Enabled: 0 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0bf296fc962d7184ab14ad1841598d5f, type: 3} m_Name: @@ -1733,7 +1733,7 @@ MonoBehaviour: m_GravityApplicationMode: 0 m_ForwardSource: {fileID: 7845086807825369409} m_LeftHandMoveAction: - m_UseReference: 0 + m_UseReference: 1 m_Action: m_Name: Left Hand Move m_Type: 0 @@ -1743,7 +1743,8 @@ MonoBehaviour: m_Interactions: m_SingletonActionBindings: [] m_Flags: 0 - m_Reference: {fileID: 0} + m_Reference: {fileID: 6972639530819350904, guid: 721820db5472c4cdb9e2c49de50d8533, + type: 3} m_RightHandMoveAction: m_UseReference: 1 m_Action: From c583eb3706f3dc5d451c9f591ece5222831b1647 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 16:06:03 +0200 Subject: [PATCH 082/121] Switch to sap orchestrator. --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 5069ef21a..c69f5673f 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "_orchestratorURL" : "http://sap.local:8080/socket.io/", + "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, From 753dada569c0af08aaedb7a8f429040e1fb9b197 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 16:06:57 +0200 Subject: [PATCH 083/121] Load local userdata on login (if available) and upload to the orchestrator. --- Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs | 7 +++++-- config.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index c01aa8a2f..e1a079aab 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1250,9 +1250,12 @@ private void OnLogin(bool userLoggedSucessfully) { Debug.Log($"OrchestratorLogin: load UserData from {fullName}"); var configData = System.IO.File.ReadAllText(fullName); - // xxxjack UserData lUserData = UserData.ParseJsonData(configData); + UserData lUserData = new UserData(); // = UserData.ParseJsonData(configData); + JsonUtility.FromJsonOverwrite(configData, lUserData); + OrchestratorController.Instance.UpdateFullUserData(lUserData); + Debug.Log($"OrchesratorLogin: uploaded UserData to orchestrator"); } - } + } OrchestratorController.Instance.StartRetrievingData(); diff --git a/config.json b/config.json index c69f5673f..956362b84 100644 --- a/config.json +++ b/config.json @@ -17,7 +17,7 @@ "autoStopAfterLeave" : false }, "LocalUser": { - + "orchestratorConfigFilename" : "config-user.json", "PCSelfConfig": { "capturerTypeName" : "synthetic", "RS2ReaderConfig": { From aea9c099891eef6ee590f39fc75371447e409950 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 16:20:33 +0200 Subject: [PATCH 084/121] Auto-fill session name when returning from another session. --- .../Pilots/LoginManager/Scripts/OrchestratorLogin.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index e1a079aab..3350cbec8 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1253,7 +1253,7 @@ private void OnLogin(bool userLoggedSucessfully) UserData lUserData = new UserData(); // = UserData.ParseJsonData(configData); JsonUtility.FromJsonOverwrite(configData, lUserData); OrchestratorController.Instance.UpdateFullUserData(lUserData); - Debug.Log($"OrchesratorLogin: uploaded UserData to orchestrator"); + Debug.Log($"OrchestratorLogin: uploaded UserData to orchestrator"); } } @@ -1630,10 +1630,11 @@ private void OnGetUserInfoHandler(User user) SetUserRepresentationGUI(user.userData.userRepresentationType); // Session name - - string time = DateTime.Now.ToString("hhmmss"); - sessionNameIF.text = $"{user.userName}_{time}"; - + if (string.IsNullOrEmpty(sessionNameIF.text)) + { + string time = DateTime.Now.ToString("hhmmss"); + sessionNameIF.text = $"{user.userName}_{time}"; + } } GetUsers(); // To update the user representation From 49d23d010168424dc72192e0ed0f864a98d5ee50 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 16:51:46 +0200 Subject: [PATCH 085/121] Getting started with storing the scenario descriptions in the scenes that implement them. --- .../LoginManager/Scripts/LoginController.cs | 2 +- .../LoginManager/Scripts/OrchestratorLogin.cs | 4 +-- .../Scripts/ScenarioDescription.cs | 27 +++++++++++++++++++ .../Scripts/ScenarioDescription.cs.meta | 11 ++++++++ .../{PilotRegistry.cs => ScenarioRegistry.cs} | 4 +-- ...istry.cs.meta => ScenarioRegistry.cs.meta} | 0 Assets/Pilots/Pilot0/Scenes/Pilot0.unity | 4 +-- .../Scenes/TechnicalPlayground.unity | 4 +-- 8 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs create mode 100644 Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta rename Assets/Pilots/LoginManager/Scripts/{PilotRegistry.cs => ScenarioRegistry.cs} (92%) rename Assets/Pilots/LoginManager/Scripts/{PilotRegistry.cs.meta => ScenarioRegistry.cs.meta} (100%) diff --git a/Assets/Pilots/LoginManager/Scripts/LoginController.cs b/Assets/Pilots/LoginManager/Scripts/LoginController.cs index 2667401ad..6013e370b 100644 --- a/Assets/Pilots/LoginManager/Scripts/LoginController.cs +++ b/Assets/Pilots/LoginManager/Scripts/LoginController.cs @@ -55,7 +55,7 @@ public override void OnUserMessageReceived(string message) } message = message.Substring(6); SessionConfig.FromJson(message); - string sceneName = PilotRegistry.Instance.GetSceneNameForPilotName(SessionConfig.Instance.scenarioName, SessionConfig.Instance.scenarioVariant); ; + string sceneName = ScenarioRegistry.Instance.GetSceneNameForPilotName(SessionConfig.Instance.scenarioName, SessionConfig.Instance.scenarioVariant); ; if (sceneName == null) { Debug.LogError($"{Name()}: Selected scenario \"{SessionConfig.Instance.scenarioName}\" not implemented in this player (unknown scene)"); diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 3350cbec8..06aa82a62 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -350,7 +350,7 @@ private void UpdateScenarios(Dropdown dd) foreach (var scenario in OrchestratorController.Instance.AvailableScenarios) { - if (PilotRegistry.Instance.GetSceneNameForPilotName(scenario.scenarioName, "") != null) + if (ScenarioRegistry.Instance.GetSceneNameForPilotName(scenario.scenarioName, "") != null) { options.Add(new Dropdown.OptionData(scenario.GetGuiRepresentation())); scenarioIDs.Add(scenario.scenarioId); @@ -361,7 +361,7 @@ private void UpdateScenarios(Dropdown dd) foreach (var scenario in OrchestratorController.Instance.AvailableScenarios) { - if (PilotRegistry.Instance.GetSceneNameForPilotName(scenario.scenarioName, "") == null) + if (ScenarioRegistry.Instance.GetSceneNameForPilotName(scenario.scenarioName, "") == null) { options.Add(new Dropdown.OptionData(scenario.GetGuiRepresentation())); scenarioIDs.Add(scenario.scenarioId); diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs new file mode 100644 index 000000000..cdc3e01b8 --- /dev/null +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ScenarioDescription : MonoBehaviour +{ + [Tooltip("Unique ID of scenario. Create only once.")] + public string scenarioId; + [Tooltip("Short name for scenario")] + public string scenarioName; + [Tooltip("Short description of the scenario")] + public string scenarioDescription; + [Tooltip("Higher numbered scenarios will appear higher in the list")] + public int scenarioPriority; + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta new file mode 100644 index 000000000..8eb9dbff2 --- /dev/null +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ec171a75429064de0a88701eb15df828 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Pilots/LoginManager/Scripts/PilotRegistry.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs similarity index 92% rename from Assets/Pilots/LoginManager/Scripts/PilotRegistry.cs rename to Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs index 673ba877c..1f6a07485 100644 --- a/Assets/Pilots/LoginManager/Scripts/PilotRegistry.cs +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs @@ -4,9 +4,9 @@ namespace VRT.Pilots.LoginManager { - public class PilotRegistry : MonoBehaviour + public class ScenarioRegistry : MonoBehaviour { - public static PilotRegistry Instance; + public static ScenarioRegistry Instance; private void Awake() { diff --git a/Assets/Pilots/LoginManager/Scripts/PilotRegistry.cs.meta b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs.meta similarity index 100% rename from Assets/Pilots/LoginManager/Scripts/PilotRegistry.cs.meta rename to Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs.meta diff --git a/Assets/Pilots/Pilot0/Scenes/Pilot0.unity b/Assets/Pilots/Pilot0/Scenes/Pilot0.unity index 180fe3fa0..dcdb38a04 100644 --- a/Assets/Pilots/Pilot0/Scenes/Pilot0.unity +++ b/Assets/Pilots/Pilot0/Scenes/Pilot0.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:895a632428be200f262478cc4cb5532f0e8ef34b12c2b637b351b25524a18293 -size 130499 +oid sha256:269f5801969ac25bd01274e950100d9568e6882bc8343d7deaea53a6823c6344 +size 134913 diff --git a/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity b/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity index 8dd0499b8..c8b6cdd09 100644 --- a/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity +++ b/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0873fdb0b9710700c19876755073937d548a6ea971a32397eb3787eb1146e04d -size 162473 +oid sha256:823e395d0430606bdb224082fcea732adf9f27b5380d943660e93277f78438fe +size 166897 From 5061ed7bec04950734df61d13e7b963d83b52aab Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 17:41:06 +0200 Subject: [PATCH 086/121] Keeping the scenario descriptions in the scenes didn't work: you cannot inspect a scene without loading it. In stead store the scenario descriptions on the object in LoginManager. --- .../LoginManager/Scenes/LoginManager.unity | 4 +-- .../Scripts/ScenarioDescription.cs | 27 ------------------- .../Scripts/ScenarioDescription.cs.meta | 11 -------- .../LoginManager/Scripts/ScenarioRegistry.cs | 26 ++++++++++++++++++ Assets/Pilots/Pilot0/Scenes/Pilot0.unity | 4 +-- .../Scenes/TechnicalPlayground.unity | 4 +-- 6 files changed, 32 insertions(+), 44 deletions(-) delete mode 100644 Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs delete mode 100644 Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index a0d4c4690..4cb967bc2 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97527d776b7fcdc9ceee18e3803fd1aa40c3b042ee3ccf877c23d4179e4c3f08 -size 48025 +oid sha256:8512447ad6442018d2796b5afdd0d61f3185940f076e6a917850ae748822bd25 +size 49296 diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs deleted file mode 100644 index cdc3e01b8..000000000 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class ScenarioDescription : MonoBehaviour -{ - [Tooltip("Unique ID of scenario. Create only once.")] - public string scenarioId; - [Tooltip("Short name for scenario")] - public string scenarioName; - [Tooltip("Short description of the scenario")] - public string scenarioDescription; - [Tooltip("Higher numbered scenarios will appear higher in the list")] - public int scenarioPriority; - - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta b/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta deleted file mode 100644 index 8eb9dbff2..000000000 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioDescription.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ec171a75429064de0a88701eb15df828 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs index 1f6a07485..65cee78db 100644 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs @@ -1,11 +1,32 @@ using VRT.Orchestrator.Wrapping; using UnityEngine; using VRT.Core; +using System.Collections.Generic; +using System; namespace VRT.Pilots.LoginManager { public class ScenarioRegistry : MonoBehaviour { + [System.Serializable] + public class ScenarioInfo + { + [Tooltip("Short name for scenario")] + public string scenarioName; + [Tooltip("Unique ID of scenario. Create only once.")] + public string scenarioId; + [Tooltip("Short description of the scenario")] + public string scenarioDescription; + [Tooltip("The name of the scene that implements this scenario")] + public string scenarioSceneName; + [Tooltip("Higher numbered scenarios will appear higher in the list")] + public int scenarioPriority; + } + + [Tooltip("Scenarios supported by this VR2Gather player")] + public List scenarios = new List(); + + public static ScenarioRegistry Instance; private void Awake() @@ -13,6 +34,11 @@ private void Awake() Instance = this; } + public void Start() + { + + } + public string GetSceneNameForPilotName(string pilotName, string pilotVariant) { // Note: Pilot scenes need to be registered here, but also added to the "scenes in build" diff --git a/Assets/Pilots/Pilot0/Scenes/Pilot0.unity b/Assets/Pilots/Pilot0/Scenes/Pilot0.unity index dcdb38a04..c6fb05114 100644 --- a/Assets/Pilots/Pilot0/Scenes/Pilot0.unity +++ b/Assets/Pilots/Pilot0/Scenes/Pilot0.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:269f5801969ac25bd01274e950100d9568e6882bc8343d7deaea53a6823c6344 -size 134913 +oid sha256:b8032cfe5ca33172fa33d57d40cfa4ef05e62a2b02e73f2c690ca718aec4faea +size 133541 diff --git a/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity b/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity index c8b6cdd09..41c2018f4 100644 --- a/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity +++ b/Assets/Pilots/TechnicalPlayground/Scenes/TechnicalPlayground.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:823e395d0430606bdb224082fcea732adf9f27b5380d943660e93277f78438fe -size 166897 +oid sha256:edefdf83656cedbc01ed94a48fa7f7c6df41967df8c97da726309ddbc5056137 +size 165515 From cb365daf4c88e8ca638cb0395925cd6b755a102a Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 23:26:34 +0200 Subject: [PATCH 087/121] Getting started on code that uses ScenarioRegistry. --- .../LoginManager/Scripts/LoginController.cs | 52 +----------- .../LoginManager/Scripts/OrchestratorLogin.cs | 82 ++++++++++++------- .../LoginManager/Scripts/ScenarioRegistry.cs | 30 +++++++ 3 files changed, 86 insertions(+), 78 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/LoginController.cs b/Assets/Pilots/LoginManager/Scripts/LoginController.cs index 6013e370b..e1dd2ee59 100644 --- a/Assets/Pilots/LoginManager/Scripts/LoginController.cs +++ b/Assets/Pilots/LoginManager/Scripts/LoginController.cs @@ -55,7 +55,7 @@ public override void OnUserMessageReceived(string message) } message = message.Substring(6); SessionConfig.FromJson(message); - string sceneName = ScenarioRegistry.Instance.GetSceneNameForPilotName(SessionConfig.Instance.scenarioName, SessionConfig.Instance.scenarioVariant); ; + string sceneName = ScenarioRegistry.Instance.GetSceneNameForSession(SessionConfig.Instance); if (sceneName == null) { Debug.LogError($"{Name()}: Selected scenario \"{SessionConfig.Instance.scenarioName}\" not implemented in this player (unknown scene)"); @@ -63,55 +63,7 @@ public override void OnUserMessageReceived(string message) } if (loadCoroutine == null) loadCoroutine = StartCoroutine(RefreshAndLoad(sceneName)); -#if xxxjack_old - - string[] msg = message.Split(new char[] { '_' }); - if (msg[0] == MessageType.START) - { - // Check Audio - switch (msg[2]) - { - case "0": // No Audio - VRTConfig.Instance.protocolType = VRTConfig.ProtocolType.None; - break; - case "1": // Socket Audio - VRTConfig.Instance.protocolType = VRTConfig.ProtocolType.SocketIO; - break; - case "2": // Dash Audio - VRTConfig.Instance.protocolType = VRTConfig.ProtocolType.Dash; - break; - case "3": // Raw TCP - VRTConfig.Instance.protocolType = VRTConfig.ProtocolType.TCP; - break; - default: - Debug.LogError($"{Name()}: received unknown START audio type {msg[2]}"); - break; - } - string pilotName = msg[1]; - string pilotVariant = null; - if (msg.Length > 3 && msg[3] != "") pilotVariant = msg[3]; - if (msg.Length > 4 && msg[4] != "") - { - VRTConfig.Instance.PCs.Codec = msg[4]; - } - if (msg.Length > 5 && msg[5] != "") - { - VRTConfig.Instance.Voice.Codec = msg[5]; - } - string sceneName = PilotRegistry.Instance.GetSceneNameForPilotName(pilotName, pilotVariant); - if (sceneName == null) - { - Debug.LogError($"{Name()}: Selected scenario \"{pilotName}\" not implemented in this player (unknown scene)"); - return; - } - - if (loadCoroutine == null) loadCoroutine = StartCoroutine(RefreshAndLoad(sceneName)); - } - else if (msg[0] == MessageType.READY) - { - // Do something to check if all the users are ready (future implementation) - } -#endif + } } diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 06aa82a62..8d7da84be 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -40,7 +40,7 @@ public class OrchestratorLogin : MonoBehaviour // Because we re-order the scenarios in the menu (to get usable ones near the top) we need to also keep // a list in order of the menu. - private List scenarioIDs; + private List scenarioInfoList; [Header("Developer")] @@ -107,6 +107,7 @@ public class OrchestratorLogin : MonoBehaviour [SerializeField] private InputField sessionNameIF = null; [SerializeField] private InputField sessionDescriptionIF = null; [SerializeField] private Dropdown scenarioIdDrop = null; + [SerializeField] private Text scenarioDescription = null; [SerializeField] private Toggle socketProtocolToggle = null; [SerializeField] private Toggle dashProtocolToggle = null; [SerializeField] private Toggle tcpProtocolToggle = null; @@ -345,6 +346,13 @@ private void UpdateScenarios(Dropdown dd) // update the dropdown dd.ClearOptions(); List options = new List(); + scenarioInfoList = new List(); + foreach (var sc in ScenarioRegistry.Instance.Scenarios) + { + options.Insert(0, new Dropdown.OptionData(sc.scenarioName)); + scenarioInfoList.Insert(0, sc); + } +#if old_scenarios // Add scenarios we have implemented first, others afterwards after a blank line scenarioIDs = new List(); foreach (var scenario in OrchestratorController.Instance.AvailableScenarios) @@ -367,6 +375,7 @@ private void UpdateScenarios(Dropdown dd) scenarioIDs.Add(scenario.scenarioId); } } +#endif dd.AddOptions(options); } @@ -482,9 +491,9 @@ private void SetUserRepresentationDescription(UserRepresentationType _representa } } - #endregion +#endregion - #region Unity +#region Unity // Start is called before the first frame update void Start() @@ -545,6 +554,15 @@ void Start() microphoneDropdown.onValueChanged.AddListener(delegate { selfRepresentationPreview.ChangeMicrophone(microphoneDropdown.options[microphoneDropdown.value].text); }); + scenarioIdDrop.onValueChanged.AddListener(delegate + { + var idx = scenarioIdDrop.value; + var sc = scenarioInfoList[idx]; + if (scenarioDescription != null) + { + scenarioDescription.text = sc.scenarioDescription; + } + }); InitialiseControllerEvents(); @@ -670,6 +688,13 @@ void AutoStateUpdate() int idx = 0; foreach (var entry in scenarioIdDrop.options) { + if (entry.text == config.sessionScenario) + { + scenarioIdDrop.value = idx; + } + idx++; + } +#if old_scenarios if (entry.text.Contains(config.sessionScenario + " ")) { if (found) @@ -681,6 +706,7 @@ void AutoStateUpdate() } idx++; } +#endif if (!found) { Debug.LogError($"OrchestratorLogin: AutoStart: No scenarios match {config.sessionScenario}"); @@ -826,9 +852,9 @@ private void OnDestroy() TerminateControllerEvents(); } - #endregion +#endregion - #region Input +#region Input void SelectFirstIF() { @@ -880,9 +906,9 @@ void TabShortcut() } } - #endregion +#endregion - #region Buttons +#region Buttons private void DeveloperModeButtonClicked() { @@ -963,9 +989,9 @@ public void ReadyButton() - #endregion +#endregion - #region Toggles +#region Toggles private void AudioToggle() { @@ -1035,9 +1061,9 @@ public void SetProtocol(string proto) - #endregion +#endregion - #region Events listeners +#region Events listeners // Subscribe to Orchestrator Wrapper Events private void InitialiseControllerEvents() @@ -1118,9 +1144,9 @@ private void TerminateControllerEvents() #endregion - #region Commands +#region Commands - #region Socket.io connect +#region Socket.io connect public void SocketConnect() { @@ -1181,10 +1207,10 @@ private void OnGetOrchestratorVersionHandler(string pVersion) OrchestratorController.Instance.GetNTPTime(); } - #endregion +#endregion - #region Login/Logout +#region Login/Logout private void SignIn() { @@ -1312,9 +1338,9 @@ private void OnLogout(bool userLogoutSucessfully) PanelChanger(); } - #endregion +#endregion - #region NTP clock +#region NTP clock private void OnGetNTPTimeResponse(NtpClock ntpTime) { @@ -1326,9 +1352,9 @@ private void OnGetNTPTimeResponse(NtpClock ntpTime) } } - #endregion +#endregion - #region Sessions +#region Sessions private void GetSessions() { @@ -1362,7 +1388,7 @@ private void AddSession() protocol = "tcp"; break; } - OrchestratorController.Instance.AddSession(scenarioIDs[scenarioIdDrop.value], + OrchestratorController.Instance.AddSession(scenarioInfoList[scenarioIdDrop.value].scenarioName, sessionNameIF.text, sessionDescriptionIF.text, protocol); @@ -1516,9 +1542,9 @@ private void OnUserLeftSessionHandler(string userID) } } - #endregion +#endregion - #region Scenarios +#region Scenarios private void OnGetScenariosHandler(Scenario[] scenarios) { @@ -1532,18 +1558,18 @@ private void OnGetScenariosHandler(Scenario[] scenarios) } } - #endregion +#endregion #if outdated_orchestrator - #region Live +#region Live private void OnGetLivePresenterDataHandler(LivePresenterData liveData) { //Debug.Log("[OrchestratorLogin][OnGetLivePresenterDataHandler] Not implemented"); } - #endregion +#endregion #endif #region Users @@ -1665,7 +1691,7 @@ private void DeleteUser() #endregion #if outdated_orchestrator - #region Rooms +#region Rooms private void GetRooms() { @@ -1699,7 +1725,7 @@ private void OnLeaveRoomHandler() Debug.LogError("OrchestratorLogin: OnLeaveRoomHandler: Not implemented"); } - #endregion +#endregion #endif #region Messages @@ -1714,7 +1740,7 @@ private void OnUserMessageReceivedHandler(UserMessage userMessage) LoginController.Instance.OnUserMessageReceived(userMessage.message); } - #endregion +#endregion private void OnMasterEventReceivedHandler(UserEvent pMasterEventData) { diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs index 65cee78db..5412637a0 100644 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs @@ -26,6 +26,12 @@ public class ScenarioInfo [Tooltip("Scenarios supported by this VR2Gather player")] public List scenarios = new List(); + public List Scenarios { + get + { + return scenarios; + } + } public static ScenarioRegistry Instance; @@ -39,6 +45,30 @@ public void Start() } + public ScenarioInfo GetScenarioByName(string name) + { + foreach (ScenarioInfo sc in scenarios) + { + if (name == sc.scenarioName) + { + return sc; + } + } + return null; + } + + public string GetSceneNameForSession(SessionConfig sessionConfig) + { + foreach(ScenarioInfo sc in scenarios) + { + if (sessionConfig.scenarioName == sc.scenarioName) + { + return sc.scenarioSceneName; + } + } + return null; + } + public string GetSceneNameForPilotName(string pilotName, string pilotVariant) { // Note: Pilot scenes need to be registered here, but also added to the "scenes in build" From ca5ca21a3b923cbb76ee3142b018f2c6b4ae1082 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 24 Aug 2023 23:55:18 +0200 Subject: [PATCH 088/121] Scenario creation dropdown is now populated from ScenarioRegistry. --- .../Prefabs/Tool_OrchestratorLogin.prefab | 88 ++++++++++++++++++- .../LoginManager/Scenes/LoginManager.unity | 4 +- .../LoginManager/Scripts/OrchestratorLogin.cs | 16 ++-- .../LoginManager/Scripts/ScenarioRegistry.cs | 6 +- 4 files changed, 99 insertions(+), 15 deletions(-) diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab index 820c05bb9..7bb28f288 100644 --- a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab @@ -4388,6 +4388,86 @@ MonoBehaviour: m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: JOIN +--- !u!1 &2094133819911799768 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5040268959078065645} + - component: {fileID: 1006088922648997294} + - component: {fileID: 4530608513733183371} + m_Layer: 5 + m_Name: ScenarioDescription + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5040268959078065645 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2094133819911799768} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6457971031914290179} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -2.699997, y: -136.6} + m_SizeDelta: {x: 836.2, y: 64} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1006088922648997294 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2094133819911799768} + m_CullTransparentMesh: 0 +--- !u!114 &4530608513733183371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2094133819911799768} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: b30c1f4e6a7dd054d9c16454a93655f7, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 0 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: (scenario description) --- !u!1 &2210502703315387142 GameObject: m_ObjectHideFlags: 0 @@ -13883,6 +13963,7 @@ RectTransform: m_Children: - {fileID: 6963007955303308105} - {fileID: 6457971032236005373} + - {fileID: 5040268959078065645} m_Father: {fileID: 6457971033769258984} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -14729,6 +14810,7 @@ MonoBehaviour: sessionNameIF: {fileID: 6457971033247036048} sessionDescriptionIF: {fileID: 6457971033459605558} scenarioIdDrop: {fileID: 6457971032236005372} + scenarioDescription: {fileID: 4530608513733183371} socketProtocolToggle: {fileID: 6285180247079457319} dashProtocolToggle: {fileID: 2156636736458350639} tcpProtocolToggle: {fileID: 1485464957} @@ -16533,8 +16615,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -100} - m_SizeDelta: {x: 900, y: 650} + m_AnchoredPosition: {x: 0, y: -96.3} + m_SizeDelta: {x: 900, y: 708.9} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6457971033769258982 CanvasRenderer: @@ -25557,7 +25639,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 200, y: -490.4} + m_AnchoredPosition: {x: 200, y: -566} m_SizeDelta: {x: -400, y: 170.3714} m_Pivot: {x: 0, y: 0} --- !u!222 &2269440385295607241 diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 4cb967bc2..ac529013d 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8512447ad6442018d2796b5afdd0d61f3185940f076e6a917850ae748822bd25 -size 49296 +oid sha256:1db519471fb64fa554ee6ecdbc6b2f01ccc67ba9399ffbc58e83bae7c12e0241 +size 49427 diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 8d7da84be..aabce3cbe 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -341,10 +341,10 @@ private void UpdateSessions(Transform container, Dropdown dd) } } - private void UpdateScenarios(Dropdown dd) + private void UpdateScenarios() { // update the dropdown - dd.ClearOptions(); + scenarioIdDrop.ClearOptions(); List options = new List(); scenarioInfoList = new List(); foreach (var sc in ScenarioRegistry.Instance.Scenarios) @@ -376,7 +376,11 @@ private void UpdateScenarios(Dropdown dd) } } #endif - dd.AddOptions(options); + scenarioIdDrop.AddOptions(options); + if (scenarioDescription != null) + { + scenarioDescription.text = scenarioInfoList[0].scenarioDescription; + } } private void UpdateRepresentations(Dropdown dd) @@ -579,7 +583,7 @@ void Start() statusText.color = connectedCol; FillSelfUserData(); UpdateSessions(orchestratorSessions, sessionIdDrop); - UpdateScenarios(scenarioIdDrop); + UpdateScenarios(); Debug.Log("OrchestratorLogin: Coming from another Scene"); OrchestratorController.Instance.OnLoginResponse(new ResponseStatus(), userId.text); @@ -1388,7 +1392,7 @@ private void AddSession() protocol = "tcp"; break; } - OrchestratorController.Instance.AddSession(scenarioInfoList[scenarioIdDrop.value].scenarioName, + OrchestratorController.Instance.AddSession(scenarioInfoList[scenarioIdDrop.value].scenarioId, sessionNameIF.text, sessionDescriptionIF.text, protocol); @@ -1551,7 +1555,7 @@ private void OnGetScenariosHandler(Scenario[] scenarios) if (scenarios != null && scenarios.Length > 0) { //update the data in the dropdown - UpdateScenarios(scenarioIdDrop); + UpdateScenarios(); // We may be able to advance auto-connection if (VRTConfig.Instance.AutoStart != null) Invoke("AutoStateUpdate", VRTConfig.Instance.AutoStart.autoDelay); diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs index 5412637a0..b6b923615 100644 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs @@ -19,11 +19,9 @@ public class ScenarioInfo public string scenarioDescription; [Tooltip("The name of the scene that implements this scenario")] public string scenarioSceneName; - [Tooltip("Higher numbered scenarios will appear higher in the list")] - public int scenarioPriority; - } + } - [Tooltip("Scenarios supported by this VR2Gather player")] + [Tooltip("Scenarios supported by this VR2Gather player. Later scenarios show up earlier in creation popup.")] public List scenarios = new List(); public List Scenarios { From b9186f05e2a6f9d8f8992bc1b2dc9a30287ab1df Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 25 Aug 2023 00:09:37 +0200 Subject: [PATCH 089/121] Getting started on only allowing join of sessions supported in this VRT2Gather player. --- .../Prefabs/Tool_OrchestratorLogin.prefab | 92 ++++++++++++++++++- .../LoginManager/Scenes/LoginManager.unity | 4 +- .../LoginManager/Scripts/OrchestratorLogin.cs | 1 + 3 files changed, 90 insertions(+), 7 deletions(-) diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab index 7bb28f288..4226d7597 100644 --- a/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_OrchestratorLogin.prefab @@ -2275,6 +2275,86 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &999481427222755746 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7133106376359139255} + - component: {fileID: 2317301597935575880} + - component: {fileID: 1983446077738297626} + m_Layer: 5 + m_Name: SessionMessage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7133106376359139255 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 999481427222755746} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6457971031866504432} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -239.9} + m_SizeDelta: {x: 400, y: 255.9} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2317301597935575880 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 999481427222755746} + m_CullTransparentMesh: 0 +--- !u!114 &1983446077738297626 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 999481427222755746} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: b30c1f4e6a7dd054d9c16454a93655f7, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 1 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: (no session selected) --- !u!1 &1049510126480423805 GameObject: m_ObjectHideFlags: 0 @@ -13724,12 +13804,13 @@ RectTransform: m_Children: - {fileID: 6963007957212619507} - {fileID: 6457971032597693188} + - {fileID: 7133106376359139255} m_Father: {fileID: 6457971032356984461} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 40, y: 50} + m_AnchoredPosition: {x: 364, y: 106.000015} m_SizeDelta: {x: 400, y: 90} m_Pivot: {x: 0, y: 0} --- !u!222 &6457971031866504397 @@ -14601,7 +14682,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -175, y: -19} + m_AnchoredPosition: {x: -615, y: -29} m_SizeDelta: {x: 330, y: 450} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6457971032401524109 @@ -14819,6 +14900,7 @@ MonoBehaviour: joinPanel: {fileID: 6457971032356984462} backJoinButton: {fileID: 2235418248480033197} sessionIdDrop: {fileID: 6457971032597693187} + sessionJoinMessage: {fileID: 1983446077738297626} refreshTimer: 5 lobbyPanel: {fileID: 6457971032172637052} sessionNameText: {fileID: 6963007955317777261} @@ -15952,7 +16034,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 240, y: -75} + m_AnchoredPosition: {x: 564, y: -227} m_SizeDelta: {x: 220, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6457971033399391676 @@ -16033,7 +16115,7 @@ MonoBehaviour: m_PressedTrigger: Pressed m_SelectedTrigger: Highlighted m_DisabledTrigger: Disabled - m_Interactable: 1 + m_Interactable: 0 m_TargetGraphic: {fileID: 6457971033399391677} m_OnClick: m_PersistentCalls: @@ -19455,7 +19537,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 6963007955639173320} m_HandleRect: {fileID: 6963007955639173321} m_Direction: 0 - m_Value: 1 + m_Value: 0 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index ac529013d..7a7f12a3b 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1db519471fb64fa554ee6ecdbc6b2f01ccc67ba9399ffbc58e83bae7c12e0241 -size 49427 +oid sha256:3cabc794034fa281ba57fea751fb13a0198100526698225c34cb088931a6805d +size 50352 diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index aabce3cbe..fd616573e 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -118,6 +118,7 @@ public class OrchestratorLogin : MonoBehaviour [SerializeField] private GameObject joinPanel = null; [SerializeField] private Button backJoinButton = null; [SerializeField] private Dropdown sessionIdDrop = null; + [SerializeField] private Text sessionJoinMessage = null; [SerializeField] private int refreshTimer = 5; [Header("Lobby")] From d590f5c170e2aee12768b359299ba754b9d2c8b3 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 25 Aug 2023 12:13:49 +0200 Subject: [PATCH 090/121] Starting on session description and enableing/disabling the join button. --- .../LoginManager/Scripts/OrchestratorLogin.cs | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index fd616573e..be571c570 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -311,7 +311,7 @@ private void UpdateUsersSession(Transform container) } } - private void UpdateSessions(Transform container, Dropdown dd) + private void UpdateSessions(Transform container) { RemoveComponentsFromList(container.transform); foreach (var session in OrchestratorController.Instance.AvailableSessions) @@ -321,25 +321,26 @@ private void UpdateSessions(Transform container, Dropdown dd) string selectedOption = ""; // store selected option in dropdown - if (dd.options.Count > 0) - selectedOption = dd.options[dd.value].text; + if (sessionIdDrop.options.Count > 0) + selectedOption = sessionIdDrop.options[sessionIdDrop.value].text; // update the dropdown - dd.ClearOptions(); + sessionIdDrop.ClearOptions(); List options = new List(); foreach (var sess in OrchestratorController.Instance.AvailableSessions) { options.Add(new Dropdown.OptionData(sess.GetGuiRepresentation())); } - dd.AddOptions(options); + sessionIdDrop.AddOptions(options); // re-assign selected option in dropdown - if (dd.options.Count > 0) + if (sessionIdDrop.options.Count > 0) { - for (int i = 0; i < dd.options.Count; ++i) + for (int i = 0; i < sessionIdDrop.options.Count; ++i) { - if (dd.options[i].text == selectedOption) - dd.value = i; + if (sessionIdDrop.options[i].text == selectedOption) + sessionIdDrop.value = i; } } + SessionSelectionChanged(); } private void UpdateScenarios() @@ -568,6 +569,7 @@ void Start() scenarioDescription.text = sc.scenarioDescription; } }); + sessionIdDrop.onValueChanged.AddListener(delegate { SessionSelectionChanged(); }); InitialiseControllerEvents(); @@ -583,7 +585,7 @@ void Start() statusText.text = OrchestratorController.Instance.ConnectionStatus.ToString(); statusText.color = connectedCol; FillSelfUserData(); - UpdateSessions(orchestratorSessions, sessionIdDrop); + UpdateSessions(orchestratorSessions); UpdateScenarios(); Debug.Log("OrchestratorLogin: Coming from another Scene"); @@ -1371,7 +1373,7 @@ private void OnSessionsHandler(Session[] sessions) if (sessions != null) { // update the list of available sessions - UpdateSessions(orchestratorSessions, sessionIdDrop); + UpdateSessions(orchestratorSessions); // We may be able to advance auto-connection if (VRTConfig.Instance.AutoStart != null) Invoke("AutoStateUpdate", VRTConfig.Instance.AutoStart.autoDelay); @@ -1405,7 +1407,7 @@ private void OnAddSessionHandler(Session session) if (session != null) { // update the list of available sessions - UpdateSessions(orchestratorSessions, sessionIdDrop); + UpdateSessions(orchestratorSessions); // Update the info in LobbyPanel isMaster = OrchestratorController.Instance.UserIsMaster; @@ -1474,6 +1476,26 @@ private void OnDeleteSessionHandler() if (developerMode) Debug.Log("OrchestratorLogin: OnDeleteSessionHandler: Session deleted"); } + private void SessionSelectionChanged() + { + var idx = sessionIdDrop.value; + string description = ""; + bool ok = idx >= 0 && idx < OrchestratorController.Instance.AvailableSessions.Length; + if (ok) + { + var sessionSelected = OrchestratorController.Instance.AvailableSessions[idx]; + var scenarioSelected = sessionSelected.scenarioId; + description = $"{sessionSelected.sessionName} by {sessionSelected.sessionMaster}\n{sessionSelected.sessionDescription}\n"; + // xxxjack check whether we support this scenario. + } + else + { + description = "(no session selected)"; + } + sessionJoinMessage.text = description; + doneJoinButton.interactable = ok; + } + private void JoinSession() { if (sessionIdDrop.options.Count <= 0) From 1ced22c6a1ed4fe72ebf0b9a23f0a08073542b8d Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 25 Aug 2023 13:52:09 +0200 Subject: [PATCH 091/121] Moved ScenarioRegistry into a prefab. This allows changing it on branches without changing the LoginManager scene (which should make it easier to merge branches in the future). --- .../Prefabs/Tool_ScenarioRegistry.prefab | 55 +++++++++++++++++++ .../Prefabs/Tool_ScenarioRegistry.prefab.meta | 7 +++ .../LoginManager/Scenes/LoginManager.unity | 4 +- 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab create mode 100644 Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab.meta diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab new file mode 100644 index 000000000..f771046ae --- /dev/null +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab @@ -0,0 +1,55 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8141314486536374814 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8141314486536374808} + - component: {fileID: 8141314486536374815} + m_Layer: 0 + m_Name: Tool_ScenarioRegistry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8141314486536374808 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8141314486536374814} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8141314486536374815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8141314486536374814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb05440274a0d154388ad037fe5d8264, type: 3} + m_Name: + m_EditorClassIdentifier: + scenarios: + - scenarioName: Pilot 0 + scenarioId: 8aef4fbe-e8a9-4e70-b009-0633e50cf356 + scenarioDescription: Fairly empty test scenario + scenarioSceneName: Pilot0 + - scenarioName: Technical Playground + scenarioId: fd170a0c-b52d-4541-af3d-5c18317e8f07 + scenarioDescription: Scenario for developers to test new things + scenarioSceneName: TechnicalPlayground diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab.meta b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab.meta new file mode 100644 index 000000000..84dff7050 --- /dev/null +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb215595e54b149439fda5e0b283e3bc +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index 7a7f12a3b..e9d848b12 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3cabc794034fa281ba57fea751fb13a0198100526698225c34cb088931a6805d -size 50352 +oid sha256:bb55768208cf542984d39f126b70f4ef1c878aea53676a6219f5fbf980945bef +size 51326 From 41738d49b71a860efcd419634ec9df1b35b890f1 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 25 Aug 2023 13:52:33 +0200 Subject: [PATCH 092/121] Various bits of cleanup. --- .../LoginManager/Scripts/OrchestratorLogin.cs | 46 +++++++++++-------- .../LoginManager/Scripts/ScenarioRegistry.cs | 15 +++++- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index be571c570..ce3ece2c4 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -38,11 +38,7 @@ public class OrchestratorLogin : MonoBehaviour private State state = State.Offline; private AutoState autoState = AutoState.DidNone; - // Because we re-order the scenarios in the menu (to get usable ones near the top) we need to also keep - // a list in order of the menu. - private List scenarioInfoList; - - + [Header("Developer")] [SerializeField] private Toggle developerModeButton = null; [SerializeField] private GameObject developerPanel = null; @@ -348,11 +344,9 @@ private void UpdateScenarios() // update the dropdown scenarioIdDrop.ClearOptions(); List options = new List(); - scenarioInfoList = new List(); foreach (var sc in ScenarioRegistry.Instance.Scenarios) { - options.Insert(0, new Dropdown.OptionData(sc.scenarioName)); - scenarioInfoList.Insert(0, sc); + options.Add(new Dropdown.OptionData(sc.scenarioName)); } #if old_scenarios // Add scenarios we have implemented first, others afterwards after a blank line @@ -379,10 +373,31 @@ private void UpdateScenarios() } #endif scenarioIdDrop.AddOptions(options); + ScenarioSelectionChanged(); + } + + private void ScenarioSelectionChanged() + { + var idx = scenarioIdDrop.value; + bool ok = false; + string message = "(no scenario selected)"; + var scenarios = ScenarioRegistry.Instance.Scenarios; + if (idx >= 0 && idx < scenarios.Count) + { + var sc = scenarios[idx]; + // Empty entries can be used as separators + if (!string.IsNullOrEmpty(sc.scenarioId)) + { + ok = true; + message = sc.scenarioDescription; + + } + } if (scenarioDescription != null) { - scenarioDescription.text = scenarioInfoList[0].scenarioDescription; + scenarioDescription.text = message; } + doneCreateButton.interactable = ok; } private void UpdateRepresentations(Dropdown dd) @@ -560,15 +575,8 @@ void Start() microphoneDropdown.onValueChanged.AddListener(delegate { selfRepresentationPreview.ChangeMicrophone(microphoneDropdown.options[microphoneDropdown.value].text); }); - scenarioIdDrop.onValueChanged.AddListener(delegate - { - var idx = scenarioIdDrop.value; - var sc = scenarioInfoList[idx]; - if (scenarioDescription != null) - { - scenarioDescription.text = sc.scenarioDescription; - } - }); + scenarioIdDrop.onValueChanged.AddListener(delegate { ScenarioSelectionChanged(); }); + sessionIdDrop.onValueChanged.AddListener(delegate { SessionSelectionChanged(); }); InitialiseControllerEvents(); @@ -1395,7 +1403,7 @@ private void AddSession() protocol = "tcp"; break; } - OrchestratorController.Instance.AddSession(scenarioInfoList[scenarioIdDrop.value].scenarioId, + OrchestratorController.Instance.AddSession(ScenarioRegistry.Instance.Scenarios[scenarioIdDrop.value].scenarioId, sessionNameIF.text, sessionDescriptionIF.text, protocol); diff --git a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs index b6b923615..72a99d104 100644 --- a/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs +++ b/Assets/Pilots/LoginManager/Scripts/ScenarioRegistry.cs @@ -21,8 +21,8 @@ public class ScenarioInfo public string scenarioSceneName; } - [Tooltip("Scenarios supported by this VR2Gather player. Later scenarios show up earlier in creation popup.")] - public List scenarios = new List(); + [Tooltip("Scenarios supported by this VR2Gather player. Order them for the creation popup.")] + [SerializeField] protected List scenarios = new List(); public List Scenarios { get @@ -54,6 +54,17 @@ public ScenarioInfo GetScenarioByName(string name) } return null; } + public ScenarioInfo GetScenarioById(string id) + { + foreach (ScenarioInfo sc in scenarios) + { + if (id == sc.scenarioId) + { + return sc; + } + } + return null; + } public string GetSceneNameForSession(SessionConfig sessionConfig) { From 4623c8be81b14336ecabd3b1eec4e46a2b7917a8 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Mon, 28 Aug 2023 23:12:19 +0200 Subject: [PATCH 093/121] At login time, send all locally known scenarios to the orchestrator using the new AddScenario command. --- .../OrchestratorController.cs | 18 +++++++++--- .../OrchestratorWrapper.cs | 28 ++++++++++++++++++- .../LoginManager/Scripts/OrchestratorLogin.cs | 12 ++++++++ 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 9b5029bfc..e9d1f29ce 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -648,9 +648,18 @@ public void OnUserLeftSession(string userID) { } } -#endregion + #endregion + + #region Scenarios + + public void AddScenario(Scenario scOrch) + { + orchestratorWrapper.AddScenario(scOrch); + } -#region Scenarios + public void OnAddScenarioResponse(ResponseStatus status) + { + } public void OnGetScenariosResponse(ResponseStatus status, List scenarios) { @@ -1058,8 +1067,9 @@ public void OnError(ResponseStatus status) { OnErrorEvent?.Invoke(status); } -#endregion -#endregion + #endregion + + #endregion } } \ No newline at end of file diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index df377af2e..8f56e3958 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -281,6 +281,22 @@ private void OnGetNTPTimeResponse(OrchestratorCommand command, OrchestratorRespo if (ResponsesListener != null)ResponsesListener.OnGetNTPTimeResponse(status, ntpTime); } + + internal void AddScenario(Scenario scOrch) + { + OrchestratorCommand command = GetOrchestratorCommand("AddScenario"); + command.GetParameter("scenarioId").ParamValue = scOrch.scenarioId; + command.GetParameter("scenarioName").ParamValue = scOrch.scenarioName; + command.GetParameter("scenarioDescription").ParamValue = scOrch.scenarioDescription; + OrchestrationSocketIoManager.EmitCommand(command); + } + + private void OnAddScenarioResponse(OrchestratorCommand command, OrchestratorResponse response) + { + ResponseStatus status = new ResponseStatus(response.error, response.message); + // Just ignore the response. We'll get another error later when we create a session. + } + public void AddSession(string scenarioId, string sessionName, string sessionDescription, string sessionProtocol) { OrchestratorCommand command = GetOrchestratorCommand("AddSession"); @@ -836,6 +852,15 @@ public void InitGrammar() //NTP new OrchestratorCommand("GetNTPTime", null, OnGetNTPTimeResponse), + // scenarios + new OrchestratorCommand("AddScenario", new List + { + new Parameter("scenarioId", typeof(string)), + new Parameter("scenarioName", typeof(string)), + new Parameter("scenarioDescription", typeof(string)), + }, + OnAddScenarioResponse + ), //sessions new OrchestratorCommand("AddSession", new List { @@ -1024,6 +1049,7 @@ public OrchestratorCommand GetOrchestratorCommand(string commandName) } return null; } -#endregion + + #endregion } } \ No newline at end of file diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index ce3ece2c4..45bd864ab 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -1264,8 +1264,20 @@ private void Login() VRTConfig.Instance.AutoStart.autoJoin = !isThisUser; } OrchestratorController.Instance.Login(userNameLoginIF.text, userPasswordLoginIF.text); + ForwardScenariosToOrchestrator(); } + private void ForwardScenariosToOrchestrator() + { + foreach(var sc in ScenarioRegistry.Instance.Scenarios) + { + Scenario scOrch = new Scenario(); + scOrch.scenarioId = sc.scenarioId; + scOrch.scenarioName = sc.scenarioName; + scOrch.scenarioDescription = sc.scenarioDescription; + OrchestratorController.Instance.AddScenario(scOrch); + } + } // Check saved used credentials. private void CheckRememberMe() { From 2142d2c8c806b1164a043a3a568bc33c78f0ad25 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 29 Aug 2023 00:06:22 +0200 Subject: [PATCH 094/121] Enable join button only if scenario supported in this player. Better session description. --- .../LoginManager/Scripts/OrchestratorLogin.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 45bd864ab..3b749c801 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -8,6 +8,7 @@ using VRT.UserRepresentation.Voice; using VRT.Core; using VRT.Pilots.Common; +using static System.Collections.Specialized.BitVector32; namespace VRT.Pilots.LoginManager { @@ -1505,9 +1506,21 @@ private void SessionSelectionChanged() { var sessionSelected = OrchestratorController.Instance.AvailableSessions[idx]; var scenarioSelected = sessionSelected.scenarioId; - description = $"{sessionSelected.sessionName} by {sessionSelected.sessionMaster}\n{sessionSelected.sessionDescription}\n"; - // xxxjack check whether we support this scenario. - } + var sessionMaster = sessionSelected.sessionMaster; + var masterUser = OrchestratorController.Instance.GetUser(sessionMaster); + var masterName = masterUser == null ? sessionMaster : masterUser.userName; + var scenarioInfo = ScenarioRegistry.Instance.GetScenarioById(scenarioSelected); + description = $"{sessionSelected.sessionName} by {masterName}\n{sessionSelected.sessionDescription}\n"; + if (scenarioInfo == null) + { + description += "Cannot join: not implemented in this VR2Gather player."; + ok = false; + } + else + { + description += scenarioInfo.scenarioDescription; + } + } else { description = "(no session selected)"; From c1078e92f8e1f84993d4af0b3855b7d66ba4e47b Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 29 Aug 2023 16:13:31 +0200 Subject: [PATCH 095/121] Added "developer" point cloud capturer. This first tries "auto" but if that fails reverts to "synthetic". Great for development: you will always be the best point cloud representation. --- .../Scripts/PointCloudCapturerFactory.cs | 13 +++++++++++-- Assets/VRTCore/VRTConfig.cs | 3 ++- Packages/packages-lock.json | 2 +- config.json | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs index 647ac9bb5..9ff5818e8 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs @@ -5,7 +5,7 @@ using UnityEngine; using static VRT.Core.VRTConfig._User; using static VRT.Core.VRTConfig._User._PCSelfConfig; - +using System; namespace VRT.UserRepresentation.PointCloud { @@ -35,7 +35,16 @@ public static AsyncPointCloudReader Create(VRTConfig._User._PCSelfConfig config, case VRTConfig._User._PCSelfConfig.PCCapturerType.remote: var rcConfig = config.RemoteCameraReaderConfig; return new AsyncNetworkCaptureReader(rcConfig.url, rcConfig.isCompressed, selfPreparerQueue, encoderQueue); - default: + case VRTConfig._User._PCSelfConfig.PCCapturerType.developer: + try + { + return new AsyncAutoReader(config.CameraReaderConfig.configFilename, config.voxelSize, config.frameRate, selfPreparerQueue, encoderQueue); + } + catch (Exception e) + { + return new AsyncSyntheticReader(config.frameRate, config.SynthReaderConfig.nPoints, selfPreparerQueue, encoderQueue); + } + default: throw new System.Exception($"PointCloudCapturerFactory: bad capturerType {config.capturerType}"); } } diff --git a/Assets/VRTCore/VRTConfig.cs b/Assets/VRTCore/VRTConfig.cs index 493531e1f..7e6178539 100644 --- a/Assets/VRTCore/VRTConfig.cs +++ b/Assets/VRTCore/VRTConfig.cs @@ -137,7 +137,8 @@ public enum PCCapturerType synthetic, remote, proxy, - prerecorded + prerecorded, + developer }; public PCCapturerType capturerType; [Tooltip("Override capturerType by name")] diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 1f486abaf..b9ebd1b41 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -183,7 +183,7 @@ "depth": 0, "source": "git", "dependencies": {}, - "hash": "693b3baf13f488e6bedbe8e123f7aecac61b4ae4" + "hash": "2cd41553666520e4660ecca4e8fd3598790ebbeb" }, "com.unity.modules.androidjni": { "version": "1.0.0", diff --git a/config.json b/config.json index 956362b84..f5375d0f5 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "orchestratorURL" : "http://sap.local:8080/socket.io/", + "o_rchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, @@ -19,7 +19,7 @@ "LocalUser": { "orchestratorConfigFilename" : "config-user.json", "PCSelfConfig": { - "capturerTypeName" : "synthetic", + "capturerTypeName" : "developer", "RS2ReaderConfig": { "configFilename": "./cameraconfig.json" }, From f8dc210448b90c91c60322674da86eb162a13a70 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 16:18:37 +0200 Subject: [PATCH 096/121] Print a warning in case of fallback to synthetic. --- .../PointClouds/Scripts/PointCloudCapturerFactory.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs index 9ff5818e8..bf14e7348 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudCapturerFactory.cs @@ -42,6 +42,7 @@ public static AsyncPointCloudReader Create(VRTConfig._User._PCSelfConfig config, } catch (Exception e) { + Debug.LogWarning("PointCloudCapturerFactory: fallback to synthetic capturer"); return new AsyncSyntheticReader(config.frameRate, config.SynthReaderConfig.nPoints, selfPreparerQueue, encoderQueue); } default: From bee163e5435255ae4559edaf978a79ea63a4210e Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 16:45:45 +0200 Subject: [PATCH 097/121] Cleanup of the code that loads bin2dash. --- .../Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs | 17 +++++++++++++++-- .../SUB/Plugins/signals-unity-bridge_pinvoke.cs | 6 +++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs b/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs index 8a794cbe1..c3cfef2d8 100644 --- a/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs +++ b/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs @@ -22,6 +22,10 @@ public struct StreamDesc public uint totalHeight; } + // Delegate types to allow loading bin2dash before actually calling it (so we can get its pathname, + // so we can tell it where its plugins are). + private delegate IntPtr delegate_vrt_create_ext(string name, int num_streams, StreamDesc[] streams, string publish_url, int seg_dur_in_ms, int timeshift_buffer_depth_in_ms, long api_version); + private class _API { const string myDllName = "bin2dash.so"; @@ -95,9 +99,18 @@ public Timestamp get_media_time(int timescale) public static connection create(string name, StreamDesc[] descriptors, string publish_url = "", int seg_dur_in_ms = 10000, int timeshift_buffer_depth_in_ms = 30000) { - IntPtr obj; + try + { + delegate_vrt_create_ext tmpDelegate = _API.vrt_create_ext; + IntPtr tmpPtr = Marshal.GetFunctionPointerForDelegate(tmpDelegate); + } + catch (System.DllNotFoundException) + { + UnityEngine.Debug.LogError("bin2dash: Cannot load bin2dash.so dynamic library"); + } + sub.SetMSPaths("bin2dash.so"); - obj = _API.vrt_create_ext(name, descriptors.Length, descriptors, publish_url, seg_dur_in_ms, timeshift_buffer_depth_in_ms); + IntPtr obj = _API.vrt_create_ext(name, descriptors.Length, descriptors, publish_url, seg_dur_in_ms, timeshift_buffer_depth_in_ms); if (obj == IntPtr.Zero) return null; return new connection(obj); diff --git a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs index cc67c9e15..f9cf720fd 100644 --- a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs +++ b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs @@ -292,8 +292,8 @@ public static void SetMSPaths(string module_base = "signals-unity-bridge") IntPtr hMod = API_kernel.GetModuleHandle(module_base); if (hMod == IntPtr.Zero) { - UnityEngine.Debug.Log($"sub.SetMSPaths: Cannot get handle on {module_base}, GetModuleHandle returned NULL. PATH={Environment.GetEnvironmentVariable("PATH")}, SIGNALS_SMD_PATH={Environment.GetEnvironmentVariable("SIGNALS_SMD_PATH")} "); - UnityEngine.Debug.LogError("Internal error while creating receiver for other participant. Try re-installing the application"); + UnityEngine.Debug.Log($"sub.SetMSPaths: Cannot get handle for {module_base}, GetModuleHandle returned NULL. PATH={Environment.GetEnvironmentVariable("PATH")}, SIGNALS_SMD_PATH={Environment.GetEnvironmentVariable("SIGNALS_SMD_PATH")} "); + UnityEngine.Debug.LogError($"Cannot GetModuleHandle({module_base}). Try re-installing the application"); return; } StringBuilder modPath = new StringBuilder(255); @@ -301,7 +301,7 @@ public static void SetMSPaths(string module_base = "signals-unity-bridge") if (rv < 0) { UnityEngine.Debug.Log($"sub.SetMSPaths: Cannot get filename for {module_base}, handle={hMod}, GetModuleFileName returned " + rv); - UnityEngine.Debug.LogError("Internal error while creating receiver for other participant. Try re-installing the application"); + UnityEngine.Debug.LogError($"Cannot get filename for {module_base} from handle. Try re-installing the application"); //return false; } string dirName = Path.GetDirectoryName(modPath.ToString()); From b6bce422c39cf767214d340ca2f967afba88553b Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 17:33:27 +0200 Subject: [PATCH 098/121] Attempting to support Signals dash libraries included in submodule. Doesn't work yet: bin2dash is found but it cannot load MPEG_DASH.smd. --- Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs | 4 ++-- .../Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs b/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs index c3cfef2d8..605f71dd9 100644 --- a/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs +++ b/Assets/Transport/Dash/Bin2Dash/Plugins/bin2dash_pinvoke.cs @@ -28,7 +28,7 @@ public struct StreamDesc private class _API { - const string myDllName = "bin2dash.so"; + public const string myDllName = "bin2dash"; // The BIN2DASH_API_VERSION must match with the DLL version. Copy from bin2dash.hpp // after matching the API used here with that in the C++ code. @@ -109,7 +109,7 @@ public static connection create(string name, StreamDesc[] descriptors, string pu UnityEngine.Debug.LogError("bin2dash: Cannot load bin2dash.so dynamic library"); } - sub.SetMSPaths("bin2dash.so"); + sub.SetMSPaths(_API.myDllName); IntPtr obj = _API.vrt_create_ext(name, descriptors.Length, descriptors, publish_url, seg_dur_in_ms, timeshift_buffer_depth_in_ms); if (obj == IntPtr.Zero) return null; diff --git a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs index f9cf720fd..e6a581a9d 100644 --- a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs +++ b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs @@ -306,7 +306,12 @@ public static void SetMSPaths(string module_base = "signals-unity-bridge") } string dirName = Path.GetDirectoryName(modPath.ToString()); dirName = dirName.Replace("\\", "/"); - dirName += "/"; +#if false + if (!dirName.EndsWith('/')) + { + dirName += "/"; + } +#endif UnityEngine.Debug.Log($"sub.SetMSPaths: xxxjack: SIGNALS_SMD_PATH={dirName}"); Environment.SetEnvironmentVariable("SIGNALS_SMD_PATH", dirName); lastMSpathInstalled = module_base; From 0ce9aeb1fef40ec11f61a18343be2ed0b1b6f71d Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 17:54:02 +0200 Subject: [PATCH 099/121] Attempting to support Signals dash libraries included in submodule. Doesn't work yet: bin2dash is found but it cannot load MPEG_DASH.smd. --- Assets/ExternalAssets/VR2G-nativeLibraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ExternalAssets/VR2G-nativeLibraries b/Assets/ExternalAssets/VR2G-nativeLibraries index b97a9b246..df8490dd5 160000 --- a/Assets/ExternalAssets/VR2G-nativeLibraries +++ b/Assets/ExternalAssets/VR2G-nativeLibraries @@ -1 +1 @@ -Subproject commit b97a9b2465815d1314d76439f19095892c5c4a22 +Subproject commit df8490dd54a49c257b37ece4269ad7969c50ff63 From a96c348fe32b494bd9dab7e3ba415e4c85becdf6 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 29 Aug 2023 21:42:31 +0200 Subject: [PATCH 100/121] Dash transmission now also works on Mac with internal plugins. --- Assets/ExternalAssets/VR2G-nativeLibraries | 2 +- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- .../Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Assets/ExternalAssets/VR2G-nativeLibraries b/Assets/ExternalAssets/VR2G-nativeLibraries index df8490dd5..817bebd49 160000 --- a/Assets/ExternalAssets/VR2G-nativeLibraries +++ b/Assets/ExternalAssets/VR2G-nativeLibraries @@ -1 +1 @@ -Subproject commit df8490dd54a49c257b37ece4269ad7969c50ff63 +Subproject commit 817bebd49cd70ab845db016c4611d982f5a56e36 diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index e9d848b12..a08484912 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb55768208cf542984d39f126b70f4ef1c878aea53676a6219f5fbf980945bef -size 51326 +oid sha256:81f46852de5ea76c13f811b5636500e52e2283d3eea3e117a07b297b7992daab +size 51400 diff --git a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs index e6a581a9d..4c1d0a450 100644 --- a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs +++ b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs @@ -266,6 +266,14 @@ public static void SetMSPaths(string module_base = "signals-unity-bridge") { UnityEngine.Debug.LogWarning($"Environment variable SIGNALS_SMD_PATH not set, Dash modules may fail to load"); } + else if(!System.IO.Path.IsPathRooted(path)) + { + // + // If this is a relative path we add our project directory to the front + // + path = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), path); + } + Debug.Log($"sub.SetMSPaths: SIGNALS_SMD_PATH={path}"); Environment.SetEnvironmentVariable("SIGNALS_SMD_PATH", path); #if DOES_NOT_WORK // Sigh: since MacOS 12 ~/lib is no longer on the default search path. So we have to add From 0657c573cf33fa00eb6e1025d52977b97adf3afd Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 22:23:15 +0200 Subject: [PATCH 101/121] Signals-unity-bridge should also preload its library before trying to find its filename. --- .../SUB/Plugins/signals-unity-bridge_pinvoke.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs index 4c1d0a450..e14aeff73 100644 --- a/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs +++ b/Assets/Transport/Dash/SUB/Plugins/signals-unity-bridge_pinvoke.cs @@ -44,6 +44,7 @@ public struct FrameInfo public int dsi_size; } + private delegate IntPtr delegate_sub_create(string pipeline, _API.MessageLogCallback callback, int maxLevel, long api_version); protected class _API { @@ -219,7 +220,15 @@ public int grab_frame(int streamIndex, IntPtr dst, int dstLen, ref FrameInfo inf public static connection create(string pipeline) { - IntPtr obj; + try + { + delegate_sub_create tmpDelegate = _API.sub_create; + IntPtr tmpPtr = Marshal.GetFunctionPointerForDelegate(tmpDelegate); + } + catch (System.DllNotFoundException) + { + UnityEngine.Debug.LogError("bin2dash: Cannot load bin2dash.so dynamic library"); + } SetMSPaths(); _API.MessageLogCallback errorCallback = (msg, level) => { @@ -239,7 +248,7 @@ public static connection create(string pipeline) UnityEngine.Debug.Log($"{_pipeline}: asynchronous message: {_msg}."); } }; - obj = _API.sub_create(pipeline, errorCallback, MAX_SUB_MESSAGE_LEVEL); + IntPtr obj = _API.sub_create(pipeline, errorCallback, MAX_SUB_MESSAGE_LEVEL); if (obj == IntPtr.Zero) return null; connection rv = new connection(obj); From 8d4e18d44b0e72f84a233436484a33d8c176766b Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Tue, 29 Aug 2023 23:53:13 +0200 Subject: [PATCH 102/121] Got rid of the instantiatePlayersDelay. --- Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup.prefab | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup.prefab b/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup.prefab index 4c729954b..9b0e2a7dd 100644 --- a/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup.prefab +++ b/Assets/Pilots/Common/Prefabs/00_Tools/Tool_scenesetup.prefab @@ -112,6 +112,7 @@ MonoBehaviour: - {fileID: 6447309684348885663} - {fileID: 5706222702953903087} NonPlayersLocation: {fileID: 7520733603305954546} + InstantiatePlayersDelay: 0 AutoSpawnOnLocation: 1 localPlayer: {fileID: 0} AllUsers: [] From 5ecbc55c407ecf4dabbc36f9d2607a4674ff881a Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 14:46:29 +0200 Subject: [PATCH 103/121] More logging. --- .../OrchestratorControllerExtensions.cs | 6 +- .../Common/Players/SessionPlayersManager.cs | 52 ++++++++++----- .../LoginManager/Scripts/OrchestratorLogin.cs | 66 ++++++++++--------- 3 files changed, 76 insertions(+), 48 deletions(-) diff --git a/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs b/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs index 167220178..0adf122f6 100644 --- a/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs +++ b/Assets/Pilots/Common/Networking/OrchestratorControllerExtensions.cs @@ -51,7 +51,7 @@ public static void SendTypeEventToAll(this OrchestratorController controller, } if (controller.SelfUser == null) { - Debug.LogWarning("OrchestratorControllerExtensions: controller.SelfUser is null"); + Debug.LogWarning("OrchestratorControllerExtensions: SendTypeEventToAll: controller.SelfUser is null"); return; } @@ -93,7 +93,7 @@ public static void SendTypeEventToMaster(this OrchestratorController controll } if (controller.SelfUser == null) { - Debug.LogWarning("OrchestratorControllerExtensions: controller.SelfUser is null"); + Debug.LogWarning("OrchestratorControllerExtensions: SendTypeEventToMaster: controller.SelfUser is null"); return; } @@ -134,7 +134,7 @@ public static void SendTypeEventToUser(this OrchestratorController controller } if (controller.SelfUser == null) { - Debug.LogWarning("OrchestratorControllerExtensions: controller.SelfUser is null"); + Debug.LogWarning("OrchestratorControllerExtensions: SendTypeEventToUser: controller.SelfUser is null"); return; } diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index c3bae6bad..bbeb942d3 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -57,6 +57,9 @@ public PlayerLocationData(int numPlayers) [Tooltip("All players")] [DisableEditing] public List AllUsers; + [Tooltip("Verbose logging")] + [SerializeField] private bool debug = true; + public Dictionary Players; private Dictionary _PlayerIdToLocation; private Dictionary _LocationToPlayerId; @@ -92,11 +95,13 @@ public void Awake() OrchestratorController.Instance.Subscribe(OnPlayerLocationData); OrchestratorController.Instance.Subscribe(OnPlayerLocationDataRequest); + if (debug) Debug.Log($"SessionPlayersManager: Awake, subscribed to PlayerLocationData"); } public void OnDestroy() { - OrchestratorController.Instance.OnUserLeaveSessionEvent -= OnUserLeft; + if (debug) Debug.Log($"SessionPlayersManager: OnDestroy, unsubscribing to PlayerLocationData"); + OrchestratorController.Instance.OnUserLeaveSessionEvent -= OnUserLeft; OrchestratorController.Instance.Unsubscribe(OnPlayerLocationData); OrchestratorController.Instance.Unsubscribe(OnPlayerLocationDataRequest); @@ -115,6 +120,7 @@ protected IEnumerator InstantiatePlayersAfterDelay() public void SetupConfigDistributors() { + if (debug) Debug.Log($"SessionPlayersManager: SetupConfigDistributors"); var configDistributors = FindObjectsOfType(); if (configDistributors == null || configDistributors.Length == 0) { @@ -130,9 +136,10 @@ public void InstantiatePlayers() { var me = OrchestratorController.Instance.SelfUser; - SetupConfigDistributors(); + SetupConfigDistributors(); + if (debug) Debug.Log($"SessionPlayersManager: Instantiating players"); - foreach (User user in OrchestratorController.Instance.ConnectedUsers) + foreach (User user in OrchestratorController.Instance.ConnectedUsers) { bool isLocalPlayer = me.userId == user.userId; GameObject player = null; @@ -192,11 +199,14 @@ public void InstantiatePlayers() { SendPlayerLocationData(); } - } + if (debug) Debug.Log($"SessionPlayersManager: All players instantiated"); + } - private void OnUserLeft(string userId) + private void OnUserLeft(string userId) { - if (Players.TryGetValue(userId, out PlayerNetworkControllerBase playerToRemove)) + if (debug) Debug.Log($"SessionPlayersManager: OnUserLeft({userId})"); + + if (Players.TryGetValue(userId, out PlayerNetworkControllerBase playerToRemove)) { RemovePlayer(playerToRemove); } else @@ -245,8 +255,6 @@ private void AddSpectator(PlayerNetworkControllerBase player) player.transform.rotation = NonPlayersLocation.rotation; Spectators.Add(player.UserId, player); - - } private void RemovePlayer(PlayerNetworkControllerBase player) @@ -259,6 +267,10 @@ private void RemovePlayer(PlayerNetworkControllerBase player) _PlayerIdToLocation.Remove(player.UserId); _LocationToPlayerId.Remove(location); } + else + { + Debug.LogWarning($"SessionPlayerManager: RemovePlayer({player.UserId}) which has no location"); + } Destroy(player.gameObject); } @@ -297,12 +309,18 @@ private void SendPlayerLocationData(string userId = null) private void OnPlayerLocationData(PlayerLocationData playerLocationData) { - if (playerLocationData == null || OrchestratorController.Instance.UserIsMaster) - { - return; - } + if (playerLocationData == null) + { + Debug.LogWarning($"SessionPlayersManager: OnPlayerLocationData: playerLocationData is null"); + return; + } + if (OrchestratorController.Instance.UserIsMaster) + { + Debug.LogWarning($"SessionPlayersManager: OnPlayerLocationData: we are not master"); + return; + } - for (int i = 0; i < playerLocationData.PlayerIds.Length; ++i) + for (int i = 0; i < playerLocationData.PlayerIds.Length; ++i) { string playerId = playerLocationData.PlayerIds[i]; if (Players.ContainsKey(playerId)) @@ -322,11 +340,15 @@ private void OnPlayerLocationDataRequest(PlayerLocationDataRequest request) { SendPlayerLocationData(request.SenderId); } - } + else + { + Debug.LogWarning($"SessionPlayersManager: OnPlayerLocationDataRequest: we are not master"); + } + } private void SetPlayerToLocation(PlayerNetworkControllerBase player, PlayerLocation location) { - Debug.Log($"[SessionPlayersManager] Set player {player.UserId} to location {location.NetworkId}."); + Debug.Log($"SessionPlayersManager: Set player {player.UserId} to location {location.NetworkId}."); string playerId = player.UserId; diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index 3b749c801..e808c8027 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -765,7 +765,10 @@ void AutoStateUpdate() public void FillSelfUserData() { - if (OrchestratorController.Instance == null || OrchestratorController.Instance.SelfUser == null) return; + if (OrchestratorController.Instance == null || OrchestratorController.Instance.SelfUser == null) + { + Debug.LogWarning($"OrchestratorLogin: FillSelfUserData: no SelfUser data yet"); + } User user = OrchestratorController.Instance.SelfUser; // UserID & Name @@ -1699,44 +1702,47 @@ private void GetUserInfo() private void OnGetUserInfoHandler(User user) { - if (user != null) + if (user == null) { - if (string.IsNullOrEmpty(userId.text) || user.userId == OrchestratorController.Instance.SelfUser.userId) - { - OrchestratorController.Instance.SelfUser = user; + Debug.LogWarning($"OrchestratorLogin: OnGetUserInfoHander: null user"); + return; + } + if (string.IsNullOrEmpty(userId.text) || user.userId == OrchestratorController.Instance.SelfUser.userId) + { + if (developerMode) Debug.Log($"OrchestratorLogin: OnGetUserInfoHandler: set SelfUser to {user.userId}"); + OrchestratorController.Instance.SelfUser = user; - userId.text = user.userId; - userName.text = user.userName; - userNameVRTText.text = user.userName; + userId.text = user.userId; + userName.text = user.userName; + userNameVRTText.text = user.userName; - //UserData - tcpPointcloudURLConfigIF.text = user.userData.userPCurl; - tcpAudioURLConfigIF.text = user.userData.userAudioUrl; - representationTypeConfigDropdown.value = (int)user.userData.userRepresentationType; + //UserData + tcpPointcloudURLConfigIF.text = user.userData.userPCurl; + tcpAudioURLConfigIF.text = user.userData.userAudioUrl; + representationTypeConfigDropdown.value = (int)user.userData.userRepresentationType; - SetUserRepresentationGUI(user.userData.userRepresentationType); - // Session name - if (string.IsNullOrEmpty(sessionNameIF.text)) - { - string time = DateTime.Now.ToString("hhmmss"); - sessionNameIF.text = $"{user.userName}_{time}"; - } + SetUserRepresentationGUI(user.userData.userRepresentationType); + // Session name + if (string.IsNullOrEmpty(sessionNameIF.text)) + { + string time = DateTime.Now.ToString("hhmmss"); + sessionNameIF.text = $"{user.userName}_{time}"; } + } - GetUsers(); // To update the user representation + GetUsers(); // To update the user representation - // Update the sfuData and UserData if is in session. - if (OrchestratorController.Instance.ConnectedUsers != null) + // Update the sfuData and UserData if is in session. + if (OrchestratorController.Instance.ConnectedUsers != null) + { + for (int i = 0; i < OrchestratorController.Instance.ConnectedUsers.Length; ++i) { - for (int i = 0; i < OrchestratorController.Instance.ConnectedUsers.Length; ++i) + if (OrchestratorController.Instance.ConnectedUsers[i].userId == user.userId) { - if (OrchestratorController.Instance.ConnectedUsers[i].userId == user.userId) - { - // sfuData - OrchestratorController.Instance.ConnectedUsers[i].sfuData = user.sfuData; - // UserData - OrchestratorController.Instance.ConnectedUsers[i].userData = user.userData; - } + // sfuData + OrchestratorController.Instance.ConnectedUsers[i].sfuData = user.sfuData; + // UserData + OrchestratorController.Instance.ConnectedUsers[i].userData = user.userData; } } } From b9161492838922c9904e3258badb5fd600afb2c7 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 14:58:23 +0200 Subject: [PATCH 104/121] Fixed bad log messages (wrong userid). --- .../PointClouds/Scripts/SyncConfigDistributor.cs | 2 +- .../PointClouds/Scripts/TilingConfigDistributor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/UserRepresentation/PointClouds/Scripts/SyncConfigDistributor.cs b/Assets/UserRepresentation/PointClouds/Scripts/SyncConfigDistributor.cs index 426bf20e9..a17d78d18 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/SyncConfigDistributor.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/SyncConfigDistributor.cs @@ -98,7 +98,7 @@ private void OnSyncConfig(SyncConfigMessage receivedData) } // Give reveicedData.data to that PointCloudPipeline. SyncConfig syncConfig = receivedData.data; - if (debug) Debug.Log($"SyncConfigDistributor: received sync information from user {selfUserId}"); + if (debug) Debug.Log($"SyncConfigDistributor: received sync information from user {receivedData.SenderId}"); pipeline.SetSyncConfig(syncConfig); } } diff --git a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs index c6072c815..281cd14b3 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs @@ -105,7 +105,7 @@ private void OnTilingConfig(TilingConfigMessage receivedData) } // Give reveicedData.data to that PointCloudPipeline. PointCloudNetworkTileDescription tilingConfig = receivedData.data; - if (debug) Debug.Log($"TilingConfigDistributor: received tiling information from user {selfUserId} with {tilingConfig.tiles.Length} tiles"); + if (debug) Debug.Log($"TilingConfigDistributor: received tiling information from user {receivedData.SenderId} with {tilingConfig.tiles.Length} tiles"); pipeline.SetTilingConfig(tilingConfig); } } From 091dc4b75d28c5f51b870e695cfa8cf1ea090ab9 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 15:35:57 +0200 Subject: [PATCH 105/121] More debug logging. --- .../Common/Networking/MessageForwarder.cs | 15 ++++++++++- .../Common/Players/SessionPlayersManager.cs | 27 +++++++------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Assets/Pilots/Common/Networking/MessageForwarder.cs b/Assets/Pilots/Common/Networking/MessageForwarder.cs index 84fee259f..7d34b3fc2 100644 --- a/Assets/Pilots/Common/Networking/MessageForwarder.cs +++ b/Assets/Pilots/Common/Networking/MessageForwarder.cs @@ -108,6 +108,7 @@ public void Unsubscribe(Action callback) where T : BaseMessage { if (!MessageForwarders.TryGetValue(typeof(T), out IMessageForwarder forwarder)) { + Debug.LogWarning($"MessageForwarder: Unsubscribe() for unknown message type"); return; } @@ -119,6 +120,7 @@ public void Forward(string jsonMessage) TypedMessage message = JsonUtility.FromJson(jsonMessage); if (!TypeFromId.TryGetValue(message.TypeId, out Type messageType)) { + Debug.LogWarning($"MessageForwarder: Forward() for unkown message type {message.TypeId}"); return; } @@ -129,7 +131,11 @@ public void Forward(string jsonMessage) { forwarder.Forward(message.Data); } - } + else + { + Debug.LogWarning($"MessageForwarder: null forwarder for messageType {messageType.Name}"); + } + } else { Debug.LogWarning($"MessageForwarder: no forwarder for messageType {messageType.Name}"); @@ -146,9 +152,14 @@ public class MessageForwarder : IMessageForwarder where T : BaseMessage { event Action _ev; + int nSubscribed = 0; public void Forward(T message) { + if (nSubscribed == 0) + { + Debug.LogWarning("MessageForwarder: Forward() but no-one subscribed"); + } _ev(message); } @@ -161,11 +172,13 @@ void IMessageForwarder.Forward(string message) public void Subscribe(Action callback) { _ev += callback; + nSubscribed++; } public void Unsubscribe(Action callback) { _ev -= callback; + nSubscribed--; } } } \ No newline at end of file diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index bbeb942d3..019398123 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -191,12 +191,9 @@ public void InstantiatePlayers() } - if (!OrchestratorController.Instance.UserIsMaster) - { - OrchestratorController.Instance.SendTypeEventToMaster(new PlayerLocationDataRequest()); - } - else + if (OrchestratorController.Instance.UserIsMaster) { + if (debug) Debug.Log($"SessionPlayersManager: sending playerLocationData to all"); SendPlayerLocationData(); } if (debug) Debug.Log($"SessionPlayersManager: All players instantiated"); @@ -229,22 +226,14 @@ private void AddPlayer(PlayerNetworkControllerBase player) { if (location.IsEmpty) { - location.SetPlayer(player); + Debug.Log($"SessionPlayersManager: Initialize player {player.UserId} to location {location.NetworkId}."); + + location.SetPlayer(player); _PlayerIdToLocation[player.UserId] = location; _LocationToPlayerId[location] = player.UserId; break; } } - - if (Players.Count > 1) - { - //No need to send anything if it's just us - SendPlayerLocationData(); - } - else - { - Debug.Log($"SessionPlayersManager: single-user session, not forwarding location data"); - } } } @@ -319,16 +308,20 @@ private void OnPlayerLocationData(PlayerLocationData playerLocationData) Debug.LogWarning($"SessionPlayersManager: OnPlayerLocationData: we are not master"); return; } - + for (int i = 0; i < playerLocationData.PlayerIds.Length; ++i) { string playerId = playerLocationData.PlayerIds[i]; if (Players.ContainsKey(playerId)) { + if (debug) Debug.Log($"SessionsPlayerManager: OnPlayerLocationData: set player {playerId} to location {i}"); PlayerNetworkControllerBase player = Players[playerId]; PlayerLocation location = PlayerLocations[playerLocationData.LocationIds[i]]; SetPlayerToLocation(player, location); + } else + { + Debug.LogWarning($"SessionsPlayersManager: OnPlayerLocationData: unknown player {playerId}"); } } From f9bf46f64c61d5a2382fe3cf0d045a01616298a1 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 15:59:41 +0200 Subject: [PATCH 106/121] More logging. I'm starting to suspect the TilingConfigDistributor. --- .../Common/Networking/HandNetworkControllerBase.cs | 5 +++++ .../PointClouds/Scripts/PointCloudPipelineOther.cs | 2 +- .../PointClouds/Scripts/TilingConfigDistributor.cs | 11 +++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs b/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs index 5b8b01594..d386a0a32 100644 --- a/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs +++ b/Assets/Pilots/Common/Networking/HandNetworkControllerBase.cs @@ -51,16 +51,21 @@ public virtual VRTGrabbableController HeldGrabbable protected PlayerNetworkControllerBase _Player; + bool subscribed = false; + protected virtual void Start() { _Player = GetComponentInParent(); OrchestratorController.Instance.RegisterEventType(MessageTypeID.TID_HandControllerData, typeof(HandNetworkControllerBase.HandControllerData)); OrchestratorController.Instance.Subscribe(OnHandControllerData); + subscribed = true; } private void OnDestroy() { + if (!subscribed) return; + subscribed = false; OrchestratorController.Instance.Unsubscribe(OnHandControllerData); } diff --git a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs index f5f9a647d..491f4ef3e 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/PointCloudPipelineOther.cs @@ -163,7 +163,7 @@ public void SetTilingConfig(PointCloudNetworkTileDescription config) } if (networkTileDescription.tiles != null && networkTileDescription.tiles.Length > 0) { - //Debug.Log($"{Name()}: xxxjack ignoring second tilingConfig"); + Debug.LogWarning($"{Name()}: SetTilingConfig: ignoring second tilingConfig"); return; } networkTileDescription = config; diff --git a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs index 281cd14b3..7dd35d4ca 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs @@ -20,17 +20,19 @@ public class TilingConfigMessage : BaseMessage private int interval = 1; // How many seconds between transmissions of the data private System.DateTime earliestNextTransmission; // Earliest time we want to do the next transmission, if non-null. const bool debug = true; + bool started = false; public void Awake() { OrchestratorController.Instance.RegisterEventType(MessageTypeID.TID_TilingConfigMessage, typeof(TilingConfigMessage)); + OrchestratorController.Instance.Subscribe(OnTilingConfig); } - + void Start() { if (debug) Debug.Log($"TilingConfigDistributor: Started"); + started = true; //Subscribe to incoming data of the type we're interested in. - OrchestratorController.Instance.Subscribe(OnTilingConfig); } private void OnDestroy() @@ -82,6 +84,11 @@ void Update() private void OnTilingConfig(TilingConfigMessage receivedData) { + Debug.Log($"TilingConfigDistributor: xxxjack received {receivedData}"); + if (!started) + { + Debug.LogWarning($"TilingConfigDistributor: received tiling information before Start()ed"); + } if (OrchestratorController.Instance.UserIsMaster) { From 783b594300b4bc3c0e1e543f595b144ef9c6f2cf Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 17:06:58 +0200 Subject: [PATCH 107/121] More logging. Now trying to find out where the orchestrator disconnect in coming from. --- .../Common/Controllers/SessionController.cs | 22 +++++++++---------- .../Scripts/TilingConfigDistributor.cs | 10 +++++++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Assets/Pilots/Common/Controllers/SessionController.cs b/Assets/Pilots/Common/Controllers/SessionController.cs index 3792f369b..2dc38fef8 100644 --- a/Assets/Pilots/Common/Controllers/SessionController.cs +++ b/Assets/Pilots/Common/Controllers/SessionController.cs @@ -40,6 +40,7 @@ private void InitialiseControllerEvents() OrchestratorController.Instance.OnUserJoinSessionEvent += OnUserJoinedSessionHandler; OrchestratorController.Instance.OnUserLeaveSessionEvent += OnUserLeftSessionHandler; OrchestratorController.Instance.OnErrorEvent += OnErrorHandler; + OrchestratorController.Instance.OnConnectionEvent += OnConnectionEventHandler; OrchestratorController.Instance.RegisterMessageForwarder(); } @@ -51,7 +52,7 @@ private void TerminateControllerEvents() OrchestratorController.Instance.OnUserJoinSessionEvent -= OnUserJoinedSessionHandler; OrchestratorController.Instance.OnUserLeaveSessionEvent -= OnUserLeftSessionHandler; OrchestratorController.Instance.OnErrorEvent -= OnErrorHandler; - + OrchestratorController.Instance.OnConnectionEvent -= OnConnectionEventHandler; OrchestratorController.Instance.UnregisterMessageForwarder(); } @@ -75,25 +76,24 @@ private void OnLeaveSessionHandler() } private void OnUserJoinedSessionHandler(string userID) - { - if (!string.IsNullOrEmpty(userID)) - { - Debug.Log($"{Name()}: user joined session: {userID}"); - } + { + Debug.LogWarning($"{Name()}: user joined session: {userID}"); } private void OnUserLeftSessionHandler(string userID) { - if (!string.IsNullOrEmpty(userID)) - { - Debug.Log($"{Name()}: user left session: {userID}"); - } + Debug.Log($"{Name()}: user left session: {userID}"); + } + + private void OnConnectionEventHandler(bool connected) + { + Debug.LogWarning($"{Name()}: Unexpected Connection event, connected={connected}"); } private void OnErrorHandler(ResponseStatus status) { - Debug.Log($"{Name()}: OnErrorHandler: {status.Error}, Error message: {status.Message}"); + Debug.LogWarning($"{Name()}: OnErrorHandler: {status.Error}, Error message: {status.Message}"); ErrorManager.Instance.EnqueueOrchestratorError(status.Error, status.Message); } } diff --git a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs index 7dd35d4ca..c0e445e62 100644 --- a/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs +++ b/Assets/UserRepresentation/PointClouds/Scripts/TilingConfigDistributor.cs @@ -24,6 +24,7 @@ public class TilingConfigMessage : BaseMessage public void Awake() { + if (debug) Debug.Log($"TilingConfigDistributor: Awake"); OrchestratorController.Instance.RegisterEventType(MessageTypeID.TID_TilingConfigMessage, typeof(TilingConfigMessage)); OrchestratorController.Instance.Subscribe(OnTilingConfig); } @@ -84,7 +85,7 @@ void Update() private void OnTilingConfig(TilingConfigMessage receivedData) { - Debug.Log($"TilingConfigDistributor: xxxjack received {receivedData}"); + Debug.Log($"TilingConfigDistributor: xxxjack received tiling info from {receivedData.SenderId}"); if (!started) { Debug.LogWarning($"TilingConfigDistributor: received tiling information before Start()ed"); @@ -92,13 +93,18 @@ private void OnTilingConfig(TilingConfigMessage receivedData) if (OrchestratorController.Instance.UserIsMaster) { + Debug.Log($"TilingConfigDistributor: xxxjack forwarding because we are master"); //I'm the master, so besides handling the data, I should also make sure to forward it. //This is because the API, to ensure authoritative decisions, doesn't allow users to directly address others. //Same kind of call as usual, but with the extra "true" argument, which ensures we forward without overwriting the SenderId OrchestratorController.Instance.SendTypeEventToAll(receivedData, true); } // We need to check whether we're getting our own data back (due to forwarding by master). Drop if so. - if (receivedData.SenderId == selfUserId) return; + if (receivedData.SenderId == selfUserId) + { + Debug.Log($"TilingConfigDistributor: xxxjack ignoring because it is from self"); + return; + } // Find PointCloudPipeline belonging to receivedData.SenderId. if (!pipelines.ContainsKey(receivedData.SenderId)) { From 91c9c52cd5c4a8b79424adf1c87aeea8256c4495 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 30 Aug 2023 17:36:37 +0200 Subject: [PATCH 108/121] Disconnect from orchestrator is serious. Turn it into a warning. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index e9d1f29ce..03bd562b1 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -290,7 +290,7 @@ public void OnGetOrchestratorVersionResponse(ResponseStatus status, string versi // SockerDisconnect response callback public void OnDisconnect() { - if (enableLogging) Debug.Log($"OrchestratorController: disconnected from orchestrator"); + Debug.LogWarning($"OrchestratorController: disconnected from orchestrator"); me = null; connectedToOrchestrator = false; connectionStatus = orchestratorConnectionStatus.__DISCONNECTED__; From 2f39bee317c329b916b013b858bed81d01e4892b Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Sun, 3 Sep 2023 21:59:12 +0200 Subject: [PATCH 109/121] Config for testing at Jacks home --- config.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index f5375d0f5..b8de4a7c4 100644 --- a/config.json +++ b/config.json @@ -1,13 +1,13 @@ { - "o_rchestratorURL" : "http://sap.local:8080/socket.io/", + "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", "_unused_AutoStart" : { "autoLogin" : true, "sessionName" : "jack-grab", "sessionScenario" : "Technical Playground", - "sessionTransportProtocol" : "", - "sessionUncompressed" : false, - "sessionUncompressedAudio" : false, + "sessionTransportProtocol" : "tcp", + "sessionUncompressed" : true, + "sessionUncompressedAudio" : true, "autoCreateForUser" : "sap", "autoCreate" : false, "autoJoin" : false, From 8d684e34c9fa22a969696ae28c036bc1f11ae9de Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Sun, 3 Sep 2023 22:02:17 +0200 Subject: [PATCH 110/121] Config for testing at Jacks home --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index b8de4a7c4..6c96cb3a5 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", - "_unused_AutoStart" : { + "AutoStart" : { "autoLogin" : true, "sessionName" : "jack-grab", "sessionScenario" : "Technical Playground", From 38ac669614743b577de3913f2d39369e864272a7 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Sun, 3 Sep 2023 23:14:33 +0200 Subject: [PATCH 111/121] Added more debug messages and rationalized control flow a little, but still can''t find the problem. --- .../OrchestratorWSManager.cs | 2 ++ .../OrchestratorWrapping/OrchestratorController.cs | 5 +++-- .../API/OrchestratorWrapping/OrchestratorWrapper.cs | 2 ++ Assets/Pilots/Common/Controllers/PilotController.cs | 13 ++++++++++++- .../Pilots/Common/Controllers/SessionController.cs | 9 ++------- Assets/VRTCore/VRTSynchronizer.cs | 1 + Assets/VRTInitializer/VRTInitializer.cs | 2 +- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs b/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs index 6ac2502cc..de9f3d2cb 100644 --- a/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs +++ b/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs @@ -27,6 +27,7 @@ using System.Collections.Generic; using System.Diagnostics; using VRT.Orchestrator.Wrapping; +using UnityEngine; /** NOTES: * NOTE 1 CommandId: @@ -131,6 +132,7 @@ public void SocketConnect(List messagesToManage) // Socket.io disconnection public void SocketDisconnect() { + UnityEngine.Debug.Log("OrchestratorWSManager: xxxjack SocketDisconnect()"); Manager.Close(); } diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 03bd562b1..e15824369 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -275,6 +275,7 @@ public void OnConnecting() { // Abort Socket connection public void Abort() { + Debug.Log("OrchestratorController: xxxjack Abort()"); orchestratorWrapper.Disconnect(); OnDisconnect(); } @@ -635,12 +636,12 @@ public void OnUserLeftSession(string userID) { if (!string.IsNullOrEmpty(userID)) { // If the session creator left, I need to leave also. if (mySession.sessionAdministrator == userID) { - if (enableLogging) Debug.Log("OrchestratorController: OnUserLeftSession: Session creator " + GetUser(userID).userName + " leaved the session."); + Debug.Log("OrchestratorController: OnUserLeftSession: Session creator " + GetUser(userID).userName + " left the session. Also leaving."); LeaveSession(); } // Otherwise, just proceed to the common user left event. else { - if (enableLogging) Debug.Log("OrchestratorController: OnUserLeftSession: User " + GetUser(userID).userName + " leaved the session."); + if (enableLogging) Debug.Log("OrchestratorController: OnUserLeftSession: User " + GetUser(userID).userName + " left the session."); // Required to update the list of connect users. orchestratorWrapper.GetSessionInfo(); OnUserLeaveSessionEvent?.Invoke(userID); diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs index 8f56e3958..86c7be03d 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorWrapper.cs @@ -189,6 +189,7 @@ public void Connect() { if ((OrchestrationSocketIoManager != null) && (OrchestrationSocketIoManager.isSocketConnected)) { + Debug.LogWarning("OrchestratorWrapper: Connect: already connected, Disconnect() and reconnect"); OrchestrationSocketIoManager.SocketDisconnect(); } OrchestrationSocketIoManager.SocketConnect(orchestratorMessages); @@ -210,6 +211,7 @@ public void Disconnect() { if (OrchestrationSocketIoManager != null) { + Debug.Log("OrchestratorWrapper: xxxjack Disconnect()"); OrchestrationSocketIoManager.SocketDisconnect(); } } diff --git a/Assets/Pilots/Common/Controllers/PilotController.cs b/Assets/Pilots/Common/Controllers/PilotController.cs index dd3926964..8d18d0ecf 100644 --- a/Assets/Pilots/Common/Controllers/PilotController.cs +++ b/Assets/Pilots/Common/Controllers/PilotController.cs @@ -50,7 +50,18 @@ public virtual void Awake() } Instance = this; Debug.Log($"{Name()}: Awake."); - } + } + + private void OnApplicationQuit() + { + SessionController ctrl = GetComponent(); + if (ctrl != null) + { + Debug.Log($"{Name()}: OnApplicationQuit: Leaving session."); + + ctrl.LeaveSession(); + } + } /// /// Call this method to load a new scene (optionally after fading out the current scene). diff --git a/Assets/Pilots/Common/Controllers/SessionController.cs b/Assets/Pilots/Common/Controllers/SessionController.cs index 2dc38fef8..b317fef30 100644 --- a/Assets/Pilots/Common/Controllers/SessionController.cs +++ b/Assets/Pilots/Common/Controllers/SessionController.cs @@ -10,8 +10,7 @@ namespace VRT.Pilots.Common { public class SessionController : MonoBehaviour { - public static SessionController Instance { get; private set; } - + public string Name() { return $"{GetType().Name}"; @@ -20,11 +19,7 @@ public string Name() // Start is called before the first frame update void Start() { - if (Instance == null) - { - Instance = this; - } - + InitialiseControllerEvents(); } diff --git a/Assets/VRTCore/VRTSynchronizer.cs b/Assets/VRTCore/VRTSynchronizer.cs index 573b8e280..86657e0f3 100644 --- a/Assets/VRTCore/VRTSynchronizer.cs +++ b/Assets/VRTCore/VRTSynchronizer.cs @@ -172,6 +172,7 @@ void _ComputeTimestampForCurrentFrame() } // If we managed to find a correctly synced timestamp for this frame // we check whether it is the first time we managed to do so. + // xxxjack this code incorrectly triggers after we have lost our connection to the orchestrator, for socketio. if (!currentFrameDesync && !stableStreamsDetected) { Debug.Log($"{Name()}: First synchronized frame produced"); diff --git a/Assets/VRTInitializer/VRTInitializer.cs b/Assets/VRTInitializer/VRTInitializer.cs index 763373243..12e678249 100644 --- a/Assets/VRTInitializer/VRTInitializer.cs +++ b/Assets/VRTInitializer/VRTInitializer.cs @@ -26,7 +26,7 @@ void Awake() private void OnApplicationQuit() { #if VRT_WITH_STATS - Statistics.Output("PilotController", $"quitting=1"); + Statistics.Output("VRTInitializer", $"quitting=1"); #endif // xxxjack the ShowTotalRefCount call may come too early, because the VoiceDashSender and VoiceDashReceiver seem to work asynchronously... BaseMemoryChunkReferences.ShowTotalRefCount(); From 304f866db0a3d1517f29c32971898d2fa6a961bd Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Sun, 3 Sep 2023 23:21:45 +0200 Subject: [PATCH 112/121] Another log message. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index e15824369..391bb7bb9 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -228,8 +228,8 @@ void Start() } private void OnDestroy() { - Debug.Log($"xxxjack OrchestratorController.OnDestroy from {gameObject.name}"); - + Debug.Log($"{gameObject.name}: OrchestratorController.OnDestroy() called. Will close orchestrator connection. "); + if (mySession != null) { #if VRT_WITH_STATS Statistics.Output("OrchestratorController", $"stopping=1, sessionId={mySession.sessionId}"); From 9161c388c400053ccffbdcba09789eae150083a5 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 3 Sep 2023 23:42:58 +0200 Subject: [PATCH 113/121] If we are not master we request the player location data. --- .../Common/Players/SessionPlayersManager.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Assets/Pilots/Common/Players/SessionPlayersManager.cs b/Assets/Pilots/Common/Players/SessionPlayersManager.cs index 019398123..33a5392c8 100644 --- a/Assets/Pilots/Common/Players/SessionPlayersManager.cs +++ b/Assets/Pilots/Common/Players/SessionPlayersManager.cs @@ -196,6 +196,11 @@ public void InstantiatePlayers() if (debug) Debug.Log($"SessionPlayersManager: sending playerLocationData to all"); SendPlayerLocationData(); } + else + { + if (debug) Debug.Log($"SessionPlayersManager: ask master for playerLocationData"); + RequestPlayerLocationData(); + } if (debug) Debug.Log($"SessionPlayersManager: All players instantiated"); } @@ -296,6 +301,16 @@ private void SendPlayerLocationData(string userId = null) } } + private void RequestPlayerLocationData() + { + if (OrchestratorController.Instance.UserIsMaster) + { + Debug.LogError($"SessionPlayersManager: master should not call RequestPlayerLocationData"); + } + PlayerLocationDataRequest data = new PlayerLocationDataRequest(); + OrchestratorController.Instance.SendTypeEventToMaster(data); + } + private void OnPlayerLocationData(PlayerLocationData playerLocationData) { if (playerLocationData == null) @@ -331,6 +346,7 @@ private void OnPlayerLocationDataRequest(PlayerLocationDataRequest request) { if (OrchestratorController.Instance.UserIsMaster) { + Debug.Log($"SessionPlayersManager: OnPlayerLocationDataRequest: reply to {request.SenderId}"); SendPlayerLocationData(request.SenderId); } else From cafb2bf6ce22603abf11c38e22cc4c7bde8022e9 Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Mon, 4 Sep 2023 00:16:54 +0200 Subject: [PATCH 114/121] Again better error haindling (including how orchestrator errors are presented to the user). --- .../API/OrchestratorWSManagement/OrchestratorWSManager.cs | 1 + .../API/OrchestratorWrapping/OrchestratorController.cs | 1 - Assets/Pilots/Common/Controllers/SessionController.cs | 4 ++-- config-user.json | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 config-user.json diff --git a/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs b/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs index de9f3d2cb..3aa9b9209 100644 --- a/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs +++ b/Assets/Orchestrator/API/OrchestratorWSManagement/OrchestratorWSManager.cs @@ -95,6 +95,7 @@ public OrchestratorWSManager(string orchestratorUrl, IOrchestratorConnectionList this.connectionListener = connectionListener; this.messagesListener = messagesListener; } + public OrchestratorWSManager(string orchestratorUrl, IOrchestratorConnectionListener connectionListener) : this(orchestratorUrl, connectionListener, null) { } diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 391bb7bb9..655390209 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -229,7 +229,6 @@ void Start() private void OnDestroy() { Debug.Log($"{gameObject.name}: OrchestratorController.OnDestroy() called. Will close orchestrator connection. "); - if (mySession != null) { #if VRT_WITH_STATS Statistics.Output("OrchestratorController", $"stopping=1, sessionId={mySession.sessionId}"); diff --git a/Assets/Pilots/Common/Controllers/SessionController.cs b/Assets/Pilots/Common/Controllers/SessionController.cs index b317fef30..517896817 100644 --- a/Assets/Pilots/Common/Controllers/SessionController.cs +++ b/Assets/Pilots/Common/Controllers/SessionController.cs @@ -88,8 +88,8 @@ private void OnConnectionEventHandler(bool connected) private void OnErrorHandler(ResponseStatus status) { - Debug.LogWarning($"{Name()}: OnErrorHandler: {status.Error}, Error message: {status.Message}"); - ErrorManager.Instance.EnqueueOrchestratorError(status.Error, status.Message); + Debug.LogError($"{Name()}: Orchestrator error {status.Error}, {status.Message}"); + // ErrorManager.Instance.EnqueueOrchestratorError(status.Error, status.Message); } } } \ No newline at end of file diff --git a/config-user.json b/config-user.json new file mode 100644 index 000000000..ca798fe37 --- /dev/null +++ b/config-user.json @@ -0,0 +1 @@ +{"userPCurl":"tcp://beelzebub.local:9901","userAudioUrl":"tcp://beelzebub.local:9900","webcamName":"None","microphoneName":"None","userRepresentationType":3} \ No newline at end of file From 40bdcdb3b6fc04c8f70179c6934a34969903e8bb Mon Sep 17 00:00:00 2001 From: "Topinambur\\dis" Date: Mon, 4 Sep 2023 12:00:19 +0200 Subject: [PATCH 115/121] Should not be under git. --- config-user.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 config-user.json diff --git a/config-user.json b/config-user.json deleted file mode 100644 index ca798fe37..000000000 --- a/config-user.json +++ /dev/null @@ -1 +0,0 @@ -{"userPCurl":"tcp://beelzebub.local:9901","userAudioUrl":"tcp://beelzebub.local:9900","webcamName":"None","microphoneName":"None","userRepresentationType":3} \ No newline at end of file From f442326955d8032f696d73585616112e7d7341c4 Mon Sep 17 00:00:00 2001 From: "Topinambur\\dis" Date: Mon, 4 Sep 2023 12:01:26 +0200 Subject: [PATCH 116/121] config-user.json shoulnd't be under git. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 65d4c8fda..95cabe742 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ Testbed.sln Assembly-CSharp.csproj cameraconfig.xml cameraconfig.json +config-user.json .collabignore *.csproj *.sln From bd5569ec345b84061389b1b5b7d87ab0d3d4fec6 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 4 Sep 2023 23:30:58 +0200 Subject: [PATCH 117/121] Stupid error caused spurious error messages about scenario not found. Fixed. --- .../Pilots/LoginManager/Scripts/OrchestratorLogin.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs index e808c8027..a18225a47 100644 --- a/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs +++ b/Assets/Pilots/LoginManager/Scripts/OrchestratorLogin.cs @@ -707,22 +707,10 @@ void AutoStateUpdate() if (entry.text == config.sessionScenario) { scenarioIdDrop.value = idx; - } - idx++; - } -#if old_scenarios - if (entry.text.Contains(config.sessionScenario + " ")) - { - if (found) - { - Debug.LogError($"OrchestratorLogin: AutoStart: Multiple scenarios match {config.sessionScenario}"); - } found = true; - scenarioIdDrop.value = idx; } idx++; } -#endif if (!found) { Debug.LogError($"OrchestratorLogin: AutoStart: No scenarios match {config.sessionScenario}"); From 4d1dad720db21ec72430a3257c5ab8c68d3a858d Mon Sep 17 00:00:00 2001 From: "BEELZEBUB\\DIS" Date: Mon, 4 Sep 2023 23:46:02 +0200 Subject: [PATCH 118/121] Got rid of code to hide errors that have BestHTTP anywhere in their stack trace. --- Assets/VRTCore/ErrorManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/VRTCore/ErrorManager.cs b/Assets/VRTCore/ErrorManager.cs index 9d3783dff..5107f5bb6 100644 --- a/Assets/VRTCore/ErrorManager.cs +++ b/Assets/VRTCore/ErrorManager.cs @@ -22,6 +22,9 @@ public class ErrorManager : MonoBehaviour [Tooltip("GameObject where dialogs are instantiated (if no errorManagerSink registered), should contain overlay canvas")] public GameObject myCanvas; + [Tooltip("Hide BestHTTP errors")] + public bool hideBestHTTPErrors = false; + ErrorManagerSink mySink = null; List queue = new List(); @@ -106,7 +109,7 @@ private void Application_logMessageReceived(string condition, string stackTrace, { error[0] = "Error"; // Don't show a popup for BestHTTP error messages - if (stackTrace.Contains("BestHTTP")) return; + if (hideBestHTTPErrors && stackTrace.Contains("BestHTTP")) return; // Don't show a popup for Quest virtual keyboard not enabled. if (condition.Contains("overlay keyboard is disabled")) return; lock (thisLock) From df30e27b5e015cd50490d6eaa3c24c7394310691 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 5 Sep 2023 11:26:06 +0200 Subject: [PATCH 119/121] Don't send messages > 1MB. Fixes one of the issues with #114. --- .../SocketIO/Workers/Writers/AsyncSocketIOWriter.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/Transport/SocketIO/Workers/Writers/AsyncSocketIOWriter.cs b/Assets/Transport/SocketIO/Workers/Writers/AsyncSocketIOWriter.cs index e170c77de..e58e33aec 100644 --- a/Assets/Transport/SocketIO/Workers/Writers/AsyncSocketIOWriter.cs +++ b/Assets/Transport/SocketIO/Workers/Writers/AsyncSocketIOWriter.cs @@ -82,7 +82,14 @@ protected override void AsyncUpdate() for (int i = 0; i < streams.Length; ++i) { BaseMemoryChunk chk = streams[i].inQueue.Dequeue(); - if (chk == null) continue; // xxxjack was return??? + if (chk == null) continue; + if (chk.length > 1000000) + { + // Messages > 1MB case socket.io to hang up the connection. This will create very + // weird errors with the current Orchestrator and BestHTTP implementations. + Debug.LogError($"{Name()}: Message size {chk.length} exceeds SocketIO 1MByte maximum. Dropping. "); + continue; + } var hdr_timestamp = BitConverter.GetBytes(chk.metadata.timestamp); var buf = new byte[chk.length+sizeof(long)]; Array.Copy(hdr_timestamp, buf, sizeof(long)); From 5ae4b68ed5ffb53df65d0e1f90015f00325998b8 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 5 Sep 2023 12:09:12 +0200 Subject: [PATCH 120/121] Revert for config changes and disable extensive logging. Prepare for merging. Closes #114. --- .../API/OrchestratorWrapping/OrchestratorController.cs | 2 +- Assets/Pilots/LoginManager/Scenes/LoginManager.unity | 4 ++-- config.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs index 655390209..a9dd71f3a 100644 --- a/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs +++ b/Assets/Orchestrator/API/OrchestratorWrapping/OrchestratorController.cs @@ -36,7 +36,7 @@ namespace VRT.Orchestrator.Wrapping public class OrchestratorController : MonoBehaviour, IOrchestratorMessagesListener, IOrchestratorResponsesListener, IUserMessagesListener, IUserSessionEventsListener { [Tooltip("Enable trace logging output")] - [SerializeField] private bool enableLogging = true; + [SerializeField] private bool enableLogging = false; #region enum public enum orchestratorConnectionStatus { diff --git a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity index a08484912..a99bed83b 100644 --- a/Assets/Pilots/LoginManager/Scenes/LoginManager.unity +++ b/Assets/Pilots/LoginManager/Scenes/LoginManager.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81f46852de5ea76c13f811b5636500e52e2283d3eea3e117a07b297b7992daab -size 51400 +oid sha256:81735814bc4755fa52da891d7d3b73d19e4f4833539cf0a37f420880aa62acd4 +size 51585 diff --git a/config.json b/config.json index 6c96cb3a5..e7608fb96 100644 --- a/config.json +++ b/config.json @@ -1,11 +1,11 @@ { - "orchestratorURL" : "http://sap.local:8080/socket.io/", + "_orchestratorURL" : "http://sap.local:8080/socket.io/", "statsOutputFile" : "", - "AutoStart" : { + "_AutoStart" : { "autoLogin" : true, "sessionName" : "jack-grab", "sessionScenario" : "Technical Playground", - "sessionTransportProtocol" : "tcp", + "sessionTransportProtocol" : "socketio", "sessionUncompressed" : true, "sessionUncompressedAudio" : true, "autoCreateForUser" : "sap", From 420c2a2ea9429598442fbef04643d0cbd474b1ab Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 5 Sep 2023 15:56:47 +0200 Subject: [PATCH 121/121] Added mediascape scenarios --- .../LoginManager/Prefabs/Tool_ScenarioRegistry.prefab | 9 +++++++++ config.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab index f771046ae..01a64fdac 100644 --- a/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab +++ b/Assets/Pilots/LoginManager/Prefabs/Tool_ScenarioRegistry.prefab @@ -45,6 +45,15 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: scenarios: + - scenarioName: Mediascape + scenarioId: 7deb98ba-e37f-42cf-9fcb-32be9f73e728 + scenarioDescription: Virtual visit to Sound&Vision Museum and Jerney Kaagman + experience + scenarioSceneName: MediaScape_Museum + - scenarioName: Mediascape Stage Only + scenarioId: 622a6710-cd24-4dca-8fb0-53bc1b660691 + scenarioDescription: Go directly to the TopPop stage, skipping the museum + scenarioSceneName: MediaScape_Stage - scenarioName: Pilot 0 scenarioId: 8aef4fbe-e8a9-4e70-b009-0633e50cf356 scenarioDescription: Fairly empty test scenario diff --git a/config.json b/config.json index 7e9fe0d1e..fd4f80b7a 100644 --- a/config.json +++ b/config.json @@ -6,7 +6,7 @@ "sessionName": "mediascape", "sessionScenario": "Mediascape", "sessionTransportProtocol": "tcp", - "autoCreateForUser": "sap", + "autoCreateForUser": "topinambur", "autoCreate": false, "autoJoin": false, "autoStartWith": 2, @@ -23,7 +23,7 @@ "LocalUser": { "orchestratorConfigFilename" : "config-user.json", "PCSelfConfig": { - "capturerTypeName" : "developer", + "capturerTypeName" : "auto", "RS2ReaderConfig": { "configFilename": "./cameraconfig.json" },