3 Commity ff63eb6830 ... 0bd7187f89

Autor SHA1 Wiadomość Data
  Till Steinert 0bd7187f89 Resolve conflict 3 lat temu
  Till Steinert d92f3e9ef3 Update Loggers 3 lat temu
  Chris b187f94c6e New Logger 3 lat temu
53 zmienionych plików z 1995 dodań i 335 usunięć
  1. 4 3
      Assembly-CSharp-Editor.csproj
  2. 4 3
      Assembly-CSharp.csproj
  3. 364 286
      Assets/Scenes/MainScene.unity
  4. 12 1
      Assets/Scripts/Controller/SensorBikeController.cs
  5. 14 0
      Assets/Scripts/Obstacles/PlayerStats.cs
  6. 61 30
      Assets/Scripts/Obstacles/SlalomPassed.cs
  7. 4 0
      Assets/Scripts/Study/SubjectManager.cs
  8. 8 0
      Assets/schoenlogger.meta
  9. 8 0
      Assets/schoenlogger/HOHCI.meta
  10. 21 0
      Assets/schoenlogger/HOHCI/HOHCICondition.cs
  11. 11 0
      Assets/schoenlogger/HOHCI/HOHCICondition.cs.meta
  12. 27 0
      Assets/schoenlogger/HOHCI/HOHCIEntry.cs
  13. 11 0
      Assets/schoenlogger/HOHCI/HOHCIEntry.cs.meta
  14. 6 0
      Assets/schoenlogger/HOHCI/HOHCILogger.cs
  15. 11 0
      Assets/schoenlogger/HOHCI/HOHCILogger.cs.meta
  16. 15 0
      Assets/schoenlogger/HOHCI/HOHCIStudyManager.cs
  17. 11 0
      Assets/schoenlogger/HOHCI/HOHCIStudyManager.cs.meta
  18. 8 0
      Assets/schoenlogger/Sample.meta
  19. 605 0
      Assets/schoenlogger/Sample/LoggerSample.unity
  20. 7 0
      Assets/schoenlogger/Sample/LoggerSample.unity.meta
  21. 8 0
      Assets/schoenlogger/Sample/Material.meta
  22. 79 0
      Assets/schoenlogger/Sample/Material/M_TestLgTrigger.mat
  23. 8 0
      Assets/schoenlogger/Sample/Material/M_TestLgTrigger.mat.meta
  24. 25 0
      Assets/schoenlogger/Sample/SampleCondition.cs
  25. 11 0
      Assets/schoenlogger/Sample/SampleCondition.cs.meta
  26. 19 0
      Assets/schoenlogger/Sample/SampleLogEntry.cs
  27. 11 0
      Assets/schoenlogger/Sample/SampleLogEntry.cs.meta
  28. 6 0
      Assets/schoenlogger/Sample/SampleLogger.cs
  29. 11 0
      Assets/schoenlogger/Sample/SampleLogger.cs.meta
  30. 12 0
      Assets/schoenlogger/Sample/SampleStudyManager.cs
  31. 11 0
      Assets/schoenlogger/Sample/SampleStudyManager.cs.meta
  32. 8 0
      Assets/schoenlogger/Sample/Scripts.meta
  33. 36 0
      Assets/schoenlogger/Sample/Scripts/TestLogTrigger.cs
  34. 11 0
      Assets/schoenlogger/Sample/Scripts/TestLogTrigger.cs.meta
  35. 60 0
      Assets/schoenlogger/Sample/Scripts/TestObjectMovement.cs
  36. 11 0
      Assets/schoenlogger/Sample/Scripts/TestObjectMovement.cs.meta
  37. 8 0
      Assets/schoenlogger/Scripts.meta
  38. 13 0
      Assets/schoenlogger/Scripts/Condition.cs
  39. 11 0
      Assets/schoenlogger/Scripts/Condition.cs.meta
  40. 64 0
      Assets/schoenlogger/Scripts/CsvCompatible.cs
  41. 11 0
      Assets/schoenlogger/Scripts/CsvCompatible.cs.meta
  42. 10 0
      Assets/schoenlogger/Scripts/LogEntry.cs
  43. 11 0
      Assets/schoenlogger/Scripts/LogEntry.cs.meta
  44. 146 0
      Assets/schoenlogger/Scripts/Logger.cs
  45. 11 0
      Assets/schoenlogger/Scripts/Logger.cs.meta
  46. 20 0
      Assets/schoenlogger/Scripts/Singleton.cs
  47. 11 0
      Assets/schoenlogger/Scripts/Singleton.cs.meta
  48. 113 0
      Assets/schoenlogger/Scripts/StudyManager.cs
  49. 11 0
      Assets/schoenlogger/Scripts/StudyManager.cs.meta
  50. 4 3
      SteamVR.csproj
  51. 4 3
      SteamVR_Editor.csproj
  52. 4 3
      SteamVR_Input_Editor.csproj
  53. 4 3
      SteamVR_Windows_EditorHelper.csproj

Plik diff jest za duży
+ 4 - 3
Assembly-CSharp-Editor.csproj


Plik diff jest za duży
+ 4 - 3
Assembly-CSharp.csproj


+ 364 - 286
Assets/Scenes/MainScene.unity

@@ -27,7 +27,7 @@ RenderSettings:
   m_AmbientIntensity: 1
   m_AmbientMode: 0
   m_SubtractiveShadowColor: {r: 0.13296545, g: 0.19145328, b: 0.33962262, a: 1}
-  m_SkyboxMaterial: {fileID: 1271851632}
+  m_SkyboxMaterial: {fileID: 2007970226}
   m_HaloStrength: 0
   m_FlareStrength: 1
   m_FlareFadeSpeed: 3
@@ -144729,6 +144729,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   type: 1
+  Logger: {fileID: 1058341837}
+  bikePlayer: {fileID: 0}
   routeId: 0
 --- !u!1001 &126807861
 PrefabInstance:
@@ -309321,6 +309323,7 @@ MonoBehaviour:
   hasFinished: 0
   hasFinishedSlalom1: 0
   hasFinishedSlalom2: 0
+  participantId: 
 --- !u!96 &265117510
 TrailRenderer:
   serializedVersion: 2
@@ -329896,6 +329899,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   type: 2
+  Logger: {fileID: 1058341837}
+  bikePlayer: {fileID: 0}
   routeId: 2
 --- !u!1001 &282830911
 PrefabInstance:
@@ -1265298,6 +1265303,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   type: 2
+  Logger: {fileID: 1058341837}
+  bikePlayer: {fileID: 0}
   routeId: 0
 --- !u!1001 &1034583107
 PrefabInstance:
@@ -1298216,6 +1298223,73 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 1058320073}
   m_PrefabAsset: {fileID: 0}
+--- !u!1 &1058341835
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1058341836}
+  - component: {fileID: 1058341838}
+  - component: {fileID: 1058341837}
+  m_Layer: 0
+  m_Name: SchoenLogger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1058341836
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1058341835}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 325.3495, y: -78.090744, z: 58.587616}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 18
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &1058341837
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1058341835}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0660470c46b11df40950dbd99438ccf6, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  studyManager: {fileID: 1058341838}
+  LogPathOverride: /home/till/.config/unity3d/DefaultCompany/VR Cycling/steerBike
+  BufferSize: 65536
+--- !u!114 &1058341838
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1058341835}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0b5b111455e594543a9e5bc8b9355e0a, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  ParticipantId: -1
+  ChangeCondition:
+    m_PersistentCalls:
+      m_Calls: []
+  StartCondition:
+    m_PersistentCalls:
+      m_Calls: []
+  EnableConsoleLogging: 0
 --- !u!1001 &1058375546
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -1439909,7 +1439983,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1169776434}
-  m_Enabled: 1
+  m_Enabled: 0
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 20f5c412b40b43bcbbbf4aa01b9051d1, type: 3}
   m_Name: 
@@ -1569457,288 +1569531,6 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 1271742810}
   m_PrefabAsset: {fileID: 0}
---- !u!21 &1271851632
-Material:
-  serializedVersion: 6
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_Name: Sky 02
-  m_Shader: {fileID: 4800000, guid: 6fc9318f5193c094c98c0d450cd61e3b, type: 3}
-  m_ShaderKeywords: _BACKGROUNDMODE_COLORS _CLOUDSLITBYSUN_ON _DISABLEDIRECTIONLIGHT_ON
-    _ENABLECLOUDS_ON _ENABLEDIRECTIONLIGHT_ON _ENABLESUNMOONMASK_ON _ENABLESUNMOON_ON
-    _ENABLESUN_ON _USECUBEMAP_ON _USEENVIRONMENTGRADIENT_ON _USETEXTURE_ON
-  m_LightmapFlags: 0
-  m_EnableInstancingVariants: 0
-  m_DoubleSidedGI: 0
-  m_CustomRenderQueue: -1
-  stringTagMap: {}
-  disabledShaderPasses: []
-  m_SavedProperties:
-    serializedVersion: 3
-    m_TexEnvs:
-    - _BackgroundCubemap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _BumpMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _CloudsCubemap:
-        m_Texture: {fileID: 8900000, guid: ee7bf433ad404fe4cb5e19b8a93b3bed, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Cubemap:
-        m_Texture: {fileID: 8900000, guid: ae71550a4c81f73409f14f4d6eca2c0f, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _CubemapBG:
-        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailAlbedoMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailMask:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailNormalMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _EmissionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MainTex:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MetallicGlossMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MoonTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Normal:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _OcclusionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _ParallaxMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _PatternCubemap:
-        m_Texture: {fileID: 8900000, guid: 3845b30ba2fbdee44a85e5ead4dd2974, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _PatternOverlay:
-        m_Texture: {fileID: 8900000, guid: 1f3407b97870a2e46864ac55deec53b0, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _SkyPatternOverlay:
-        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Spherical:
-        m_Texture: {fileID: 2800000, guid: 61c0b9c0523734e0e91bc6043c72a490, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _StarsCubemap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Sun:
-        m_Texture: {fileID: 2800000, guid: 19982f8bf5fa2ed42b65ac271d4f0279, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _SunTexture:
-        m_Texture: {fileID: 2800000, guid: dd566660fc358aa4098080e42ca0db56, type: 3}
-        m_Scale: {x: 0, y: 0}
-        m_Offset: {x: 1, y: 1}
-    - _Tex:
-        m_Texture: {fileID: 2800000, guid: 623f215c9cf5dc04aa628d4dd7b6bd73, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Texture:
-        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TextureSample0:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 4.46, y: 5.19}
-        m_Offset: {x: 0, y: 0}
-    - _TextureSample1:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 1.46, y: -1.61}
-        m_Offset: {x: 1.05, y: 3.12}
-    - _TextureSample2:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TopTexture0:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TwinklingTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _scaledTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _tex:
-        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _texcoord:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _texture:
-        m_Texture: {fileID: 2800000, guid: 64e7766099ad46747a07014e44d0aea1, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    m_Floats:
-    - _BackgroundCat: 1
-    - _BackgroundCubemapSpace: 0
-    - _BackgroundExposure: 1
-    - _BackgroundMode: 0
-    - _Banner: 1
-    - _BumpScale: 1
-    - _CloudHeight: 0
-    - _CloudsCat: 1
-    - _CloudsHeight: 0.1
-    - _CloudsLitbySun: 1
-    - _CloudsRotation: 10
-    - _CloudsRotationSpeed: 1
-    - _Contrast: 0.477
-    - _Contrsat: 1
-    - _Cutoff: 0
-    - _DetailNormalMapScale: 1
-    - _DisableCloudsRotation: 0
-    - _DisableDirectionLight: 1
-    - _DisableRotation: 0
-    - _DstBlend: 0
-    - _Enable1Twinkling: 0
-    - _EnableBuiltinFog: 0
-    - _EnableClouds: 1
-    - _EnableCloudsRotation: 0
-    - _EnableDirectionLight: 1
-    - _EnableFogMessage: 0
-    - _EnableMoon: 0
-    - _EnablePatternOverlay: 0
-    - _EnableSkyPatternOverlay: 0
-    - _EnableStars: 0
-    - _EnableStarsRotation: 0
-    - _EnableStarsTwinkling: 0
-    - _EnableSun: 1
-    - _EnableSunMask: 0
-    - _EnableSunMoon: 1
-    - _EnableSunMoonMask: 1
-    - _EnableTwinkling: 0
-    - _EqHeight: 0.419
-    - _EquatorHeight: 0.275
-    - _EquatorSmoothness: 0.741
-    - _Exposure: 0
-    - _Fade: 0.463
-    - _Float0: 2.7
-    - _Float1: 0
-    - _Float2: 0
-    - _Float3: 8.91
-    - _Float4: -1
-    - _Float5: -0.2
-    - _Float6: 1
-    - _FogCat: 1
-    - _FogFill: 0.273
-    - _FogHeight: 0.165
-    - _FogIntensity: 0
-    - _FogSmoothness: 0.47
-    - _GlossMapScale: 1
-    - _Glossiness: 0.5
-    - _GlossyReflections: 1
-    - _Keyword0: 0
-    - _Metallic: 0
-    - _Mode: 0
-    - _MoonCat: 1
-    - _MoonIntensity: 1
-    - _MoonSize: 0.5
-    - _OcclusionStrength: 1
-    - _Parallax: 0.02
-    - _PatternCat: 1
-    - _PatternContrast: 0.2
-    - _RoatationSpeed: 0.4
-    - _Rotation: 0
-    - _RotationSpeed: 0.5
-    - _SkyPatternContrast: 0.477
-    - _SkyPatternOverlay: 0
-    - _SmoothnessTextureChannel: 0
-    - _SpecularHighlights: 1
-    - _SrcBlend: 1
-    - _StarsAmount: 3
-    - _StarsCat: 1
-    - _StarsHeightMask: 0
-    - _StarsIntensity: 0
-    - _StarsLayer: 1
-    - _StarsRotation: 360
-    - _StarsRotationSpeed: 0.5
-    - _StarsSize: 0
-    - _StarsSunMask: 0
-    - _SunCat: 1
-    - _SunIntensity: 2.33
-    - _SunRadiusB: 0
-    - _SunRadoisA: 0.463
-    - _SunSize: 0.864
-    - _ToggleSwitch0: 0
-    - _TwinklingContrast: 0
-    - _TwinklingSpeed: 0
-    - _UVSec: 0
-    - _UseCUBEMAP: 1
-    - _UseEnvironmentGradient: 1
-    - _UseSkyPatternOverlay: 0
-    - _UseTexture: 1
-    - _WaveScale: 0
-    - _WaveSpeed: 0
-    - _ZWrite: 1
-    - __dirty: 0
-    - _adf: 0
-    - _angle: 145
-    - _fresnell: 0
-    - _mip: 0
-    m_Colors:
-    - _CloudLightColor: {r: 1, g: 1, b: 1, a: 1}
-    - _CloudShadowColor: {r: 0.33239606, g: 0.46899295, b: 0.85294116, a: 1}
-    - _CloudsLightColor: {r: 0.9338235, g: 0.9338235, b: 0.9338235, a: 1}
-    - _CloudsShadowColor: {r: 0.4625865, g: 0.49787903, b: 0.9117647, a: 1}
-    - _Color: {r: 1, g: 1, b: 1, a: 1}
-    - _Color0: {r: 0, g: 0.5054344, b: 1, a: 0}
-    - _Color1: {r: 1, g: 1, b: 1, a: 0}
-    - _Color2: {r: 0.059472326, g: 0.25068596, b: 0.8088235, a: 0}
-    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
-    - _Eq: {r: 1, g: 0.6769777, b: 0.330882, a: 0}
-    - _EquatorColor: {r: 1, g: 0.956522, b: 0.8632076, a: 0}
-    - _Ground: {r: 0.4779411, g: 0.43111518, b: 0.23545504, a: 0}
-    - _GroundColor: {r: 0.3679245, g: 0.3679245, b: 0.3679245, a: 0}
-    - _MoonColor: {r: 1, g: 1, b: 1, a: 1}
-    - _Sky: {r: 0.6691177, g: 0.29519898, b: 0.29519898, a: 0}
-    - _SkyColor: {r: 0.4462442, g: 0.5670902, b: 0.8679245, a: 0}
-    - _Skycol: {r: 0.27941146, g: 0.64219046, b: 1, a: 0}
-    - _SunColor: {r: 1, g: 0.85071, b: 0.66176474, a: 1}
-    - _Tint: {r: 1, g: 1, b: 1, a: 0}
-    - _Vector1: {r: 0, g: 1, b: 0, a: 0}
-    - _water: {r: 0.5, g: 0.5, b: 0.5, a: 1}
-  m_BuildTextureStacks: []
 --- !u!1001 &1272076782
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -1793165,6 +1792957,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   type: 0
+  Logger: {fileID: 1058341837}
+  bikePlayer: {fileID: 0}
   routeId: 0
 --- !u!1001 &1439413521
 PrefabInstance:
@@ -2334786,7 +2334580,7 @@ MonoBehaviour:
   - routeNumber: 2
     activeMeasure: 5
     steeringMode: 2
-  activeCondition: 1
+  activeCondition: 2
 --- !u!114 &1845199122
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2334799,7 +2334593,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 26bfac760eed4cb6a149af6640c8b518, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  subjectIdentifier: Till
+  subjectIdentifier: tmp
 --- !u!114 &1845199123
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2566706,6 +2566500,288 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 2007965976}
   m_PrefabAsset: {fileID: 0}
+--- !u!21 &2007970226
+Material:
+  serializedVersion: 6
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Sky 02
+  m_Shader: {fileID: 4800000, guid: 6fc9318f5193c094c98c0d450cd61e3b, type: 3}
+  m_ShaderKeywords: _BACKGROUNDMODE_COLORS _CLOUDSLITBYSUN_ON _DISABLEDIRECTIONLIGHT_ON
+    _ENABLECLOUDS_ON _ENABLEDIRECTIONLIGHT_ON _ENABLESUNMOONMASK_ON _ENABLESUNMOON_ON
+    _ENABLESUN_ON _USECUBEMAP_ON _USEENVIRONMENTGRADIENT_ON _USETEXTURE_ON
+  m_LightmapFlags: 0
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: -1
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BackgroundCubemap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _CloudsCubemap:
+        m_Texture: {fileID: 8900000, guid: ee7bf433ad404fe4cb5e19b8a93b3bed, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Cubemap:
+        m_Texture: {fileID: 8900000, guid: ae71550a4c81f73409f14f4d6eca2c0f, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _CubemapBG:
+        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MoonTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Normal:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _PatternCubemap:
+        m_Texture: {fileID: 8900000, guid: 3845b30ba2fbdee44a85e5ead4dd2974, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _PatternOverlay:
+        m_Texture: {fileID: 8900000, guid: 1f3407b97870a2e46864ac55deec53b0, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _SkyPatternOverlay:
+        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Spherical:
+        m_Texture: {fileID: 2800000, guid: 61c0b9c0523734e0e91bc6043c72a490, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _StarsCubemap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Sun:
+        m_Texture: {fileID: 2800000, guid: 19982f8bf5fa2ed42b65ac271d4f0279, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _SunTexture:
+        m_Texture: {fileID: 2800000, guid: dd566660fc358aa4098080e42ca0db56, type: 3}
+        m_Scale: {x: 0, y: 0}
+        m_Offset: {x: 1, y: 1}
+    - _Tex:
+        m_Texture: {fileID: 2800000, guid: 623f215c9cf5dc04aa628d4dd7b6bd73, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Texture:
+        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TextureSample0:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 4.46, y: 5.19}
+        m_Offset: {x: 0, y: 0}
+    - _TextureSample1:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 1.46, y: -1.61}
+        m_Offset: {x: 1.05, y: 3.12}
+    - _TextureSample2:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TopTexture0:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TwinklingTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _scaledTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _tex:
+        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _texcoord:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _texture:
+        m_Texture: {fileID: 2800000, guid: 64e7766099ad46747a07014e44d0aea1, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Floats:
+    - _BackgroundCat: 1
+    - _BackgroundCubemapSpace: 0
+    - _BackgroundExposure: 1
+    - _BackgroundMode: 0
+    - _Banner: 1
+    - _BumpScale: 1
+    - _CloudHeight: 0
+    - _CloudsCat: 1
+    - _CloudsHeight: 0.1
+    - _CloudsLitbySun: 1
+    - _CloudsRotation: 10
+    - _CloudsRotationSpeed: 1
+    - _Contrast: 0.477
+    - _Contrsat: 1
+    - _Cutoff: 0
+    - _DetailNormalMapScale: 1
+    - _DisableCloudsRotation: 0
+    - _DisableDirectionLight: 1
+    - _DisableRotation: 0
+    - _DstBlend: 0
+    - _Enable1Twinkling: 0
+    - _EnableBuiltinFog: 0
+    - _EnableClouds: 1
+    - _EnableCloudsRotation: 0
+    - _EnableDirectionLight: 1
+    - _EnableFogMessage: 0
+    - _EnableMoon: 0
+    - _EnablePatternOverlay: 0
+    - _EnableSkyPatternOverlay: 0
+    - _EnableStars: 0
+    - _EnableStarsRotation: 0
+    - _EnableStarsTwinkling: 0
+    - _EnableSun: 1
+    - _EnableSunMask: 0
+    - _EnableSunMoon: 1
+    - _EnableSunMoonMask: 1
+    - _EnableTwinkling: 0
+    - _EqHeight: 0.419
+    - _EquatorHeight: 0.275
+    - _EquatorSmoothness: 0.741
+    - _Exposure: 0
+    - _Fade: 0.463
+    - _Float0: 2.7
+    - _Float1: 0
+    - _Float2: 0
+    - _Float3: 8.91
+    - _Float4: -1
+    - _Float5: -0.2
+    - _Float6: 1
+    - _FogCat: 1
+    - _FogFill: 0.273
+    - _FogHeight: 0.165
+    - _FogIntensity: 0
+    - _FogSmoothness: 0.47
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Keyword0: 0
+    - _Metallic: 0
+    - _Mode: 0
+    - _MoonCat: 1
+    - _MoonIntensity: 1
+    - _MoonSize: 0.5
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _PatternCat: 1
+    - _PatternContrast: 0.2
+    - _RoatationSpeed: 0.4
+    - _Rotation: 0
+    - _RotationSpeed: 0.5
+    - _SkyPatternContrast: 0.477
+    - _SkyPatternOverlay: 0
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 1
+    - _StarsAmount: 3
+    - _StarsCat: 1
+    - _StarsHeightMask: 0
+    - _StarsIntensity: 0
+    - _StarsLayer: 1
+    - _StarsRotation: 360
+    - _StarsRotationSpeed: 0.5
+    - _StarsSize: 0
+    - _StarsSunMask: 0
+    - _SunCat: 1
+    - _SunIntensity: 2.33
+    - _SunRadiusB: 0
+    - _SunRadoisA: 0.463
+    - _SunSize: 0.864
+    - _ToggleSwitch0: 0
+    - _TwinklingContrast: 0
+    - _TwinklingSpeed: 0
+    - _UVSec: 0
+    - _UseCUBEMAP: 1
+    - _UseEnvironmentGradient: 1
+    - _UseSkyPatternOverlay: 0
+    - _UseTexture: 1
+    - _WaveScale: 0
+    - _WaveSpeed: 0
+    - _ZWrite: 1
+    - __dirty: 0
+    - _adf: 0
+    - _angle: 145
+    - _fresnell: 0
+    - _mip: 0
+    m_Colors:
+    - _CloudLightColor: {r: 1, g: 1, b: 1, a: 1}
+    - _CloudShadowColor: {r: 0.33239606, g: 0.46899295, b: 0.85294116, a: 1}
+    - _CloudsLightColor: {r: 0.9338235, g: 0.9338235, b: 0.9338235, a: 1}
+    - _CloudsShadowColor: {r: 0.4625865, g: 0.49787903, b: 0.9117647, a: 1}
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
+    - _Color0: {r: 0, g: 0.5054344, b: 1, a: 0}
+    - _Color1: {r: 1, g: 1, b: 1, a: 0}
+    - _Color2: {r: 0.059472326, g: 0.25068596, b: 0.8088235, a: 0}
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+    - _Eq: {r: 1, g: 0.6769777, b: 0.330882, a: 0}
+    - _EquatorColor: {r: 1, g: 0.956522, b: 0.8632076, a: 0}
+    - _Ground: {r: 0.4779411, g: 0.43111518, b: 0.23545504, a: 0}
+    - _GroundColor: {r: 0.3679245, g: 0.3679245, b: 0.3679245, a: 0}
+    - _MoonColor: {r: 1, g: 1, b: 1, a: 1}
+    - _Sky: {r: 0.6691177, g: 0.29519898, b: 0.29519898, a: 0}
+    - _SkyColor: {r: 0.4462442, g: 0.5670902, b: 0.8679245, a: 0}
+    - _Skycol: {r: 0.27941146, g: 0.64219046, b: 1, a: 0}
+    - _SunColor: {r: 1, g: 0.85071, b: 0.66176474, a: 1}
+    - _Tint: {r: 1, g: 1, b: 1, a: 0}
+    - _Vector1: {r: 0, g: 1, b: 0, a: 0}
+    - _water: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+  m_BuildTextureStacks: []
 --- !u!1001 &2008014575
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -2750592,6 +2750668,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   type: 2
+  Logger: {fileID: 1058341837}
+  bikePlayer: {fileID: 0}
   routeId: 1
 --- !u!1001 &2135232027
 PrefabInstance:

+ 12 - 1
Assets/Scripts/Controller/SensorBikeController.cs

@@ -59,6 +59,7 @@ namespace Controller
         public float tolerance_local = 7;
         public int claibrationcount = 10;
 
+        private GameObject bikePlayer;
         private void Start()
         {
             isFrontWheelTrackerNotNull = frontWheelTrackerConfig.frontWheelTracker != null;
@@ -75,6 +76,8 @@ namespace Controller
                 CalibratePolar()
                 //polarRotationMapping.center = polarData.Value.Acc.y;
             }
+
+            bikePlayer = GameObject.Find("bike");
             Debug.Log("Default fpr previousLeanValues " + previousLeanValues.DefaultIfEmpty());
         }
 
@@ -90,7 +93,6 @@ namespace Controller
                 yield return new WaitForSeconds(0.25f); //evtl. new loeschen
             }
             polarRotationMapping.center = calibrationLeanValues.Average();
-            
         }
 
         private void Update()
@@ -103,6 +105,15 @@ namespace Controller
             if (steer) SetSteer();
 
             if (lean) SetLeaningAngle();
+
+            var polarData = sensorData.BleData;
+            if (polarData != null) 
+            {
+                var playerStats = bikePlayer.GetComponent<PlayerStats>();
+                playerStats.rotationPolarX = polarData.Value.Acc.x;
+                playerStats.rotationPolarY = polarData.Value.Acc.y;
+                playerStats.rotationPolarZ = polarData.Value.Acc.z;
+            }
         }
 
         public void SetCondition(Study.SteeringMode mode)

+ 14 - 0
Assets/Scripts/Obstacles/PlayerStats.cs

@@ -11,6 +11,11 @@ public class PlayerStats : MonoBehaviour
     public int hasFinished;
     public int hasFinishedSlalom1;
     public int hasFinishedSlalom2;
+    public string participantId;
+
+    public float rotationPolarX;
+    public float rotationPolarY;
+    public float rotationPolarZ;
 
     // Start is called before the first frame update
     void Start()
@@ -20,6 +25,10 @@ public class PlayerStats : MonoBehaviour
         hasFinished = -1;
         hasFinishedSlalom1 = -1;
         hasFinishedSlalom2 = -1;
+        participantId = "";
+        rotationPolarX = 0f;
+        rotationPolarY = 0f;
+        rotationPolarZ = 0f;
     }
 
     // Update is called once per frame
@@ -59,6 +68,11 @@ public class PlayerStats : MonoBehaviour
         }
     }
 
+    public void SetParticipantID(string id)
+    {
+        participantId = id;
+    }
+
     public void IncreaseCollisionCounter() 
     {
         collisionCounter += 1;

+ 61 - 30
Assets/Scripts/Obstacles/SlalomPassed.cs

@@ -1,47 +1,78 @@
 using Study;
+using SchoenLogger.HOHCI;
 using UnityEngine;
 
 public enum WaypointType { slalom1, slalom2, finish};
-public class SlalomPassed : MonoBehaviour
+
+namespace SchoenLogger.HOHCI
 {
-    public WaypointType type;
-    // Only relevant to check finish
-    public int routeId;
-    // Start is called before the first frame update
-    void Start()
+    public class SlalomPassed : MonoBehaviour
     {
-        
-    }
+        public WaypointType type;
+        public Logger<HOHCIEntry, HOHCICondition> Logger;
 
-    // Update is called once per frame
-    void Update()
-    {
-        
-    }
+        public GameObject bikePlayer;
 
-    private void OnTriggerEnter(Collider other)
-    {
-        if (other.CompareTag("bike"))
+        // Only relevant to check finish
+        public int routeId;
+        // Start is called before the first frame update
+        void Start()
         {
-            // Set finished in statistics, so success is logged
-            var bikePlayer = GameObject.Find("bike");
-            var playerStats = bikePlayer.GetComponent<PlayerStats>();
-            Debug.Log("Waypoint passed");
-            if (type == WaypointType.finish)
+            bikePlayer = GameObject.Find("bike");
+        }
+
+        // Update is called once per frame
+        void Update()
+        {
+
+        }
+
+        private void OnTriggerEnter(Collider other)
+        {
+            if (other.CompareTag("bike"))
             {
-                var cm = GameObject.Find("ExperimentManager").GetComponent<ConditionManager>();
-                int routeNbr = cm.GetRouteNumber();
-                // If type is finish, we need to make sure we only set for right finish
-                // because routes are overlapping
-                if (routeId == routeNbr)
+                // Set finished in statistics, so success is logged
+                var bikePlayer = GameObject.Find("bike");
+                var playerStats = bikePlayer.GetComponent<PlayerStats>();
+                Debug.Log("Waypoint passed");
+                if (type == WaypointType.finish)
+                {
+                    var cm = GameObject.Find("ExperimentManager").GetComponent<ConditionManager>();
+                    int routeNbr = cm.GetRouteNumber();
+                    // If type is finish, we need to make sure we only set for right finish
+                    // because routes are overlapping
+                    if (routeId == routeNbr)
+                    {
+                        playerStats.SetWaypointPassed(type);
+                    }
+                }
+                else
                 {
                     playerStats.SetWaypointPassed(type);
                 }
-            } 
-            else
-            {
-                playerStats.SetWaypointPassed(type);
+
+                // we want to write a log entry each time a waypoint is passed
+                WriteToLog();
             }
         }
+
+        private void WriteToLog()
+        {
+            if (Logger == null) return;
+
+            var playerStats = bikePlayer.GetComponent<PlayerStats>();
+            HOHCIEntry entry = new HOHCIEntry();
+
+            entry.Time = Time.time;
+            entry.ParticipantID = playerStats.participantId;
+            entry.steeringCondition = playerStats.condition;
+            entry.ReachedFinish = playerStats.hasFinished;
+            entry.ReachedSlalom1 = playerStats.hasFinishedSlalom1;
+            entry.ReachedSlalom2 = playerStats.hasFinishedSlalom2;
+            entry.CoinCount = playerStats.coinCounter;
+            entry.CollisionCount = playerStats.collisionCounter;
+
+            Logger.Log(entry);
+        }
     }
 }

+ 4 - 0
Assets/Scripts/Study/SubjectManager.cs

@@ -11,6 +11,10 @@ namespace Study
         {
             if (string.IsNullOrEmpty(subjectIdentifier))
                 throw new Exception("You have to specify a subject for the experiment!");
+
+            var bikePlayer = GameObject.Find("bike");
+            var playerStats = bikePlayer.GetComponent<PlayerStats>();
+            playerStats.SetParticipantID(subjectIdentifier);
         }
     }
 }

+ 8 - 0
Assets/schoenlogger.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8981afef9bd04724d92221393e324ecb
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/schoenlogger/HOHCI.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b1011f0d7d0fd554a8876c97f4f4d51d
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 21 - 0
Assets/schoenlogger/HOHCI/HOHCICondition.cs

@@ -0,0 +1,21 @@
+using System;
+using Study;
+using UnityEngine;
+
+namespace SchoenLogger.HOHCI
+{
+    [Serializable]
+    public class HOHCICondition : Condition
+    {
+
+        [SerializeField]
+        public SteeringMode steer;
+
+        public HOHCICondition() { }
+
+        public HOHCICondition(SteeringMode steerType)
+        {
+            steer = steerType;
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/HOHCI/HOHCICondition.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 47b7fcb58a9207046bedf3a6c3b49902
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 27 - 0
Assets/schoenlogger/HOHCI/HOHCIEntry.cs

@@ -0,0 +1,27 @@
+using System;
+using UnityEngine;
+
+namespace SchoenLogger.HOHCI
+{
+    [Serializable]
+    public class HOHCIEntry : LogEntry
+    {
+        [SerializeField]
+        public float Time;
+
+        [SerializeField]
+        public string ParticipantID;
+        [SerializeField]
+        public string steeringCondition;
+        [SerializeField]
+        public int CoinCount;
+        [SerializeField]
+        public int CollisionCount;
+        [SerializeField]
+        public int ReachedFinish;
+        [SerializeField]
+        public int ReachedSlalom1;
+        [SerializeField]
+        public int ReachedSlalom2;
+    }
+}

+ 11 - 0
Assets/schoenlogger/HOHCI/HOHCIEntry.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0605c5c7101d55a45a121a35e882d352
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 0
Assets/schoenlogger/HOHCI/HOHCILogger.cs

@@ -0,0 +1,6 @@
+namespace SchoenLogger.HOHCI
+{
+    public class HOHCILogger : Logger<HOHCIEntry, HOHCICondition>
+    {
+    }
+}

+ 11 - 0
Assets/schoenlogger/HOHCI/HOHCILogger.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0660470c46b11df40950dbd99438ccf6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 0
Assets/schoenlogger/HOHCI/HOHCIStudyManager.cs

@@ -0,0 +1,15 @@
+using Study;
+
+namespace SchoenLogger.HOHCI
+{
+    public class HOHCIStudyManager : StudyManager<HOHCICondition>
+    {
+        protected override void CreateConditions(ref HOHCICondition[] conditions)
+        {
+            conditions = new HOHCICondition[3];
+            conditions[0] = new HOHCICondition(SteeringMode.frontWheel);
+            conditions[1] = new HOHCICondition(SteeringMode.HMD);
+            conditions[2] = new HOHCICondition(SteeringMode.Leaning);
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/HOHCI/HOHCIStudyManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0b5b111455e594543a9e5bc8b9355e0a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/schoenlogger/Sample.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7145e3d4d99e55e4b9a815c8c7b5a69b
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 605 - 0
Assets/schoenlogger/Sample/LoggerSample.unity

@@ -0,0 +1,605 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_OcclusionBakeSettings:
+    smallestOccluder: 5
+    smallestHole: 0.25
+    backfaceThreshold: 100
+  m_SceneGUID: 00000000000000000000000000000000
+  m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 9
+  m_Fog: 0
+  m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+  m_FogMode: 3
+  m_FogDensity: 0.01
+  m_LinearFogStart: 0
+  m_LinearFogEnd: 300
+  m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+  m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+  m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+  m_AmbientIntensity: 1
+  m_AmbientMode: 0
+  m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+  m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
+  m_HaloStrength: 0.5
+  m_FlareStrength: 1
+  m_FlareFadeSpeed: 3
+  m_HaloTexture: {fileID: 0}
+  m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+  m_DefaultReflectionMode: 0
+  m_DefaultReflectionResolution: 128
+  m_ReflectionBounces: 1
+  m_ReflectionIntensity: 1
+  m_CustomReflection: {fileID: 0}
+  m_Sun: {fileID: 0}
+  m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
+  m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 12
+  m_GIWorkflowMode: 1
+  m_GISettings:
+    serializedVersion: 2
+    m_BounceScale: 1
+    m_IndirectOutputScale: 1
+    m_AlbedoBoost: 1
+    m_EnvironmentLightingMode: 0
+    m_EnableBakedLightmaps: 1
+    m_EnableRealtimeLightmaps: 0
+  m_LightmapEditorSettings:
+    serializedVersion: 12
+    m_Resolution: 2
+    m_BakeResolution: 40
+    m_AtlasSize: 1024
+    m_AO: 0
+    m_AOMaxDistance: 1
+    m_CompAOExponent: 1
+    m_CompAOExponentDirect: 0
+    m_ExtractAmbientOcclusion: 0
+    m_Padding: 2
+    m_LightmapParameters: {fileID: 0}
+    m_LightmapsBakeMode: 1
+    m_TextureCompression: 1
+    m_FinalGather: 0
+    m_FinalGatherFiltering: 1
+    m_FinalGatherRayCount: 256
+    m_ReflectionCompression: 2
+    m_MixedBakeMode: 2
+    m_BakeBackend: 1
+    m_PVRSampling: 1
+    m_PVRDirectSampleCount: 32
+    m_PVRSampleCount: 512
+    m_PVRBounces: 2
+    m_PVREnvironmentSampleCount: 256
+    m_PVREnvironmentReferencePointCount: 2048
+    m_PVRFilteringMode: 1
+    m_PVRDenoiserTypeDirect: 1
+    m_PVRDenoiserTypeIndirect: 1
+    m_PVRDenoiserTypeAO: 1
+    m_PVRFilterTypeDirect: 0
+    m_PVRFilterTypeIndirect: 0
+    m_PVRFilterTypeAO: 0
+    m_PVREnvironmentMIS: 1
+    m_PVRCulling: 1
+    m_PVRFilteringGaussRadiusDirect: 1
+    m_PVRFilteringGaussRadiusIndirect: 5
+    m_PVRFilteringGaussRadiusAO: 2
+    m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+    m_PVRFilteringAtrousPositionSigmaIndirect: 2
+    m_PVRFilteringAtrousPositionSigmaAO: 1
+    m_ExportTrainingData: 0
+    m_TrainingDataDestination: TrainingData
+    m_LightProbeSampleCountMultiplier: 4
+  m_LightingDataAsset: {fileID: 0}
+  m_LightingSettings: {fileID: 0}
+--- !u!196 &4
+NavMeshSettings:
+  serializedVersion: 2
+  m_ObjectHideFlags: 0
+  m_BuildSettings:
+    serializedVersion: 2
+    agentTypeID: 0
+    agentRadius: 0.5
+    agentHeight: 2
+    agentSlope: 45
+    agentClimb: 0.4
+    ledgeDropHeight: 0
+    maxJumpAcrossDistance: 0
+    minRegionArea: 2
+    manualCellSize: 0
+    cellSize: 0.16666667
+    manualTileSize: 0
+    tileSize: 256
+    accuratePlacement: 0
+    maxJobWorkers: 0
+    preserveTilesOutsideBounds: 0
+    debug:
+      m_Flags: 0
+  m_NavMeshData: {fileID: 0}
+--- !u!1 &199222653
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 199222655}
+  - component: {fileID: 199222654}
+  - component: {fileID: 199222656}
+  m_Layer: 0
+  m_Name: Logging
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!114 &199222654
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 199222653}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 91953bf3084d6cd47a29ca925fb11fb0, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  ParticipantId: -1
+  ChangeCondition:
+    m_PersistentCalls:
+      m_Calls: []
+  StartCondition:
+    m_PersistentCalls:
+      m_Calls: []
+  EnableConsoleLogging: 1
+--- !u!4 &199222655
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 199222653}
+  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_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 2
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &199222656
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 199222653}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 12d75976798818543bdecb0288ff52eb, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  studyManager: {fileID: 199222654}
+  LogPathOverride: 
+  BufferSize: 65536
+--- !u!1 &516424547
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 516424549}
+  - component: {fileID: 516424548}
+  m_Layer: 0
+  m_Name: Directional Light
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!108 &516424548
+Light:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 516424547}
+  m_Enabled: 1
+  serializedVersion: 10
+  m_Type: 1
+  m_Shape: 0
+  m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
+  m_Intensity: 1
+  m_Range: 10
+  m_SpotAngle: 30
+  m_InnerSpotAngle: 21.80208
+  m_CookieSize: 10
+  m_Shadows:
+    m_Type: 2
+    m_Resolution: -1
+    m_CustomResolution: -1
+    m_Strength: 1
+    m_Bias: 0.05
+    m_NormalBias: 0.4
+    m_NearPlane: 0.2
+    m_CullingMatrixOverride:
+      e00: 1
+      e01: 0
+      e02: 0
+      e03: 0
+      e10: 0
+      e11: 1
+      e12: 0
+      e13: 0
+      e20: 0
+      e21: 0
+      e22: 1
+      e23: 0
+      e30: 0
+      e31: 0
+      e32: 0
+      e33: 1
+    m_UseCullingMatrixOverride: 0
+  m_Cookie: {fileID: 0}
+  m_DrawHalo: 0
+  m_Flare: {fileID: 0}
+  m_RenderMode: 0
+  m_CullingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
+  m_RenderingLayerMask: 1
+  m_Lightmapping: 4
+  m_LightShadowCasterMode: 0
+  m_AreaSize: {x: 1, y: 1}
+  m_BounceIntensity: 1
+  m_ColorTemperature: 6570
+  m_UseColorTemperature: 0
+  m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
+  m_UseBoundingSphereOverride: 0
+  m_UseViewFrustumForShadowCasterCull: 1
+  m_ShadowRadius: 0
+  m_ShadowAngle: 0
+--- !u!4 &516424549
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 516424547}
+  m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
+  m_LocalPosition: {x: 0, y: 3, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
+--- !u!1 &1137261977
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1137261980}
+  - component: {fileID: 1137261979}
+  - component: {fileID: 1137261978}
+  m_Layer: 0
+  m_Name: Main Camera
+  m_TagString: MainCamera
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!81 &1137261978
+AudioListener:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1137261977}
+  m_Enabled: 1
+--- !u!20 &1137261979
+Camera:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1137261977}
+  m_Enabled: 1
+  serializedVersion: 2
+  m_ClearFlags: 1
+  m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+  m_projectionMatrixMode: 1
+  m_GateFitMode: 2
+  m_FOVAxisMode: 0
+  m_SensorSize: {x: 36, y: 24}
+  m_LensShift: {x: 0, y: 0}
+  m_FocalLength: 50
+  m_NormalizedViewPortRect:
+    serializedVersion: 2
+    x: 0
+    y: 0
+    width: 1
+    height: 1
+  near clip plane: 0.3
+  far clip plane: 1000
+  field of view: 60
+  orthographic: 0
+  orthographic size: 5
+  m_Depth: -1
+  m_CullingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
+  m_RenderingPath: -1
+  m_TargetTexture: {fileID: 0}
+  m_TargetDisplay: 0
+  m_TargetEye: 3
+  m_HDR: 1
+  m_AllowMSAA: 1
+  m_AllowDynamicResolution: 0
+  m_ForceIntoRT: 0
+  m_OcclusionCulling: 1
+  m_StereoConvergence: 10
+  m_StereoSeparation: 0.022
+--- !u!4 &1137261980
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1137261977}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 1, z: -10}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1317765838
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1317765842}
+  - component: {fileID: 1317765841}
+  - component: {fileID: 1317765840}
+  - component: {fileID: 1317765839}
+  - component: {fileID: 1317765843}
+  m_Layer: 0
+  m_Name: TestLogTrigger
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!135 &1317765839
+SphereCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1317765838}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 1
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Radius: 0.5
+  m_Center: {x: 0, y: 0, z: 0}
+--- !u!23 &1317765840
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1317765838}
+  m_Enabled: 1
+  m_CastShadows: 1
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: b038b3527e8ab4f46badf5e5057d2520, type: 2}
+  m_StaticBatchInfo:
+    firstSubMesh: 0
+    subMeshCount: 0
+  m_StaticBatchRoot: {fileID: 0}
+  m_ProbeAnchor: {fileID: 0}
+  m_LightProbeVolumeOverride: {fileID: 0}
+  m_ScaleInLightmap: 1
+  m_ReceiveGI: 1
+  m_PreserveUVs: 0
+  m_IgnoreNormalsForChartDetection: 0
+  m_ImportantGI: 0
+  m_StitchLightmapSeams: 1
+  m_SelectedEditorRenderState: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}
+--- !u!33 &1317765841
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1317765838}
+  m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &1317765842
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1317765838}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 2.1, z: 0}
+  m_LocalScale: {x: 3, y: 3, z: 3}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 4
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &1317765843
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1317765838}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f264c6fa4bb661e4b89ba9aca7308dcb, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  Logger: {fileID: 199222656}
+--- !u!1 &1527076746
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1527076750}
+  - component: {fileID: 1527076749}
+  - component: {fileID: 1527076748}
+  - component: {fileID: 1527076747}
+  - component: {fileID: 1527076751}
+  - component: {fileID: 1527076752}
+  m_Layer: 0
+  m_Name: TestObject
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!65 &1527076747
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  m_Material: {fileID: 0}
+  m_IsTrigger: 0
+  m_Enabled: 1
+  serializedVersion: 2
+  m_Size: {x: 1, y: 1, z: 1}
+  m_Center: {x: 0, y: 0, z: 0}
+--- !u!23 &1527076748
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  m_Enabled: 1
+  m_CastShadows: 1
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
+  m_StaticBatchInfo:
+    firstSubMesh: 0
+    subMeshCount: 0
+  m_StaticBatchRoot: {fileID: 0}
+  m_ProbeAnchor: {fileID: 0}
+  m_LightProbeVolumeOverride: {fileID: 0}
+  m_ScaleInLightmap: 1
+  m_ReceiveGI: 1
+  m_PreserveUVs: 0
+  m_IgnoreNormalsForChartDetection: 0
+  m_ImportantGI: 0
+  m_StitchLightmapSeams: 1
+  m_SelectedEditorRenderState: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}
+--- !u!33 &1527076749
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &1527076750
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  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_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!54 &1527076751
+Rigidbody:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  serializedVersion: 2
+  m_Mass: 1
+  m_Drag: 0
+  m_AngularDrag: 0.05
+  m_UseGravity: 0
+  m_IsKinematic: 1
+  m_Interpolate: 0
+  m_Constraints: 0
+  m_CollisionDetection: 0
+--- !u!114 &1527076752
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1527076746}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 6b5b374565160204685f32346064cc9d, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  StudyManager: {fileID: 199222654}
+  slowSpeed: 30
+  fastSpeed: 60

+ 7 - 0
Assets/schoenlogger/Sample/LoggerSample.unity.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 0ea141471d3cc4f4fadb82089f49175e
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/schoenlogger/Sample/Material.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c88b9cccb9afa1341873a36a744bd82b
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 79 - 0
Assets/schoenlogger/Sample/Material/M_TestLgTrigger.mat

@@ -0,0 +1,79 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+  serializedVersion: 6
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: M_TestLgTrigger
+  m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
+  m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF
+  m_LightmapFlags: 2
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: 3000
+  stringTagMap:
+    RenderType: Transparent
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Floats:
+    - _BumpScale: 1
+    - _Cutoff: 0.5
+    - _DetailNormalMapScale: 1
+    - _DstBlend: 10
+    - _GlossMapScale: 1
+    - _Glossiness: 0
+    - _GlossyReflections: 0
+    - _Metallic: 0
+    - _Mode: 3
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 0
+    - _SrcBlend: 1
+    - _UVSec: 0
+    - _ZWrite: 0
+    m_Colors:
+    - _Color: {r: 0, g: 0.8909936, b: 1, a: 0.20392157}
+    - _EmissionColor: {r: 0, g: 0.15389305, b: 0.13216698, a: 1}
+  m_BuildTextureStacks: []

+ 8 - 0
Assets/schoenlogger/Sample/Material/M_TestLgTrigger.mat.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b038b3527e8ab4f46badf5e5057d2520
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
Assets/schoenlogger/Sample/SampleCondition.cs

@@ -0,0 +1,25 @@
+using System;
+using UnityEngine;
+
+namespace SchoenLogger.Sample
+{
+    [Serializable]
+    public class SampleCondition : Condition
+    {
+        public enum MovementType
+        {
+            randomMovement,
+            fastRandomMovement
+        }
+        
+        [SerializeField]
+        public MovementType movement;
+
+        public SampleCondition() { }
+
+        public SampleCondition(MovementType movementType)
+        {
+            movement = movementType;
+        }
+    }   
+}

+ 11 - 0
Assets/schoenlogger/Sample/SampleCondition.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6432e15335eb2ac4c9ba3ba8b8884ecd
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
Assets/schoenlogger/Sample/SampleLogEntry.cs

@@ -0,0 +1,19 @@
+using System;
+using UnityEngine;
+
+namespace SchoenLogger.Sample
+{
+    [Serializable]
+    public class SampleLogEntry : LogEntry
+    {
+        [SerializeField]
+        public float Time;
+
+        [SerializeField]
+        public float EntryPointX;
+        [SerializeField]
+        public float EntryPointY;
+        [SerializeField]
+        public float EntryPointZ;
+    }
+}

+ 11 - 0
Assets/schoenlogger/Sample/SampleLogEntry.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 814a5097782e71d4aae32a1657894aa8
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 0
Assets/schoenlogger/Sample/SampleLogger.cs

@@ -0,0 +1,6 @@
+namespace SchoenLogger.Sample
+{
+    public class SampleLogger : Logger<SampleLogEntry, SampleCondition>
+    {
+    }
+}

+ 11 - 0
Assets/schoenlogger/Sample/SampleLogger.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 12d75976798818543bdecb0288ff52eb
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 0
Assets/schoenlogger/Sample/SampleStudyManager.cs

@@ -0,0 +1,12 @@
+namespace SchoenLogger.Sample
+{
+    public class SampleStudyManager : StudyManager<SampleCondition>
+    {
+        protected override void CreateConditions(ref SampleCondition[] conditions)
+        {
+            conditions = new SampleCondition[2];
+            conditions[0] = new SampleCondition(SampleCondition.MovementType.randomMovement);
+            conditions[1] = new SampleCondition(SampleCondition.MovementType.fastRandomMovement);
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/Sample/SampleStudyManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 91953bf3084d6cd47a29ca925fb11fb0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/schoenlogger/Sample/Scripts.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f1ec34ec9e34d56438d15cde6aedaae9
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 36 - 0
Assets/schoenlogger/Sample/Scripts/TestLogTrigger.cs

@@ -0,0 +1,36 @@
+using UnityEngine;
+
+namespace SchoenLogger.Sample
+{
+    public class TestLogTrigger : MonoBehaviour
+    {
+        public Logger<SampleLogEntry, SampleCondition> Logger;
+        
+        // Start is called before the first frame update
+        void Start()
+        {
+        
+        }
+
+        // Update is called once per frame
+        void Update()
+        {
+        
+        }
+
+        private void OnTriggerEnter(Collider other)
+        {
+            if (Logger == null)
+                return;
+            
+            SampleLogEntry entry = new SampleLogEntry();
+            entry.Time = Time.time;
+            Vector3 point = other.ClosestPoint(this.transform.position);
+            entry.EntryPointX = point.x * 20000;
+            entry.EntryPointY = point.y / 20000;
+            entry.EntryPointZ = point.z;
+            Logger.Log(entry);
+        }
+    }
+
+}

+ 11 - 0
Assets/schoenlogger/Sample/Scripts/TestLogTrigger.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f264c6fa4bb661e4b89ba9aca7308dcb
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 60 - 0
Assets/schoenlogger/Sample/Scripts/TestObjectMovement.cs

@@ -0,0 +1,60 @@
+using System.Collections;
+using System.Collections.Generic;
+using SchoenLogger;
+using SchoenLogger.Sample;
+using UnityEngine;
+
+namespace SchoenLogger.Sample
+{
+    public class TestObjectMovement : MonoBehaviour
+    {
+        public StudyManager<SampleCondition> StudyManager;
+        public float slowSpeed = 3;
+        public float fastSpeed = 6;
+        
+        private SampleCondition currentCondition;
+        private bool started = false;
+        private Vector3 target = Vector3.zero;
+        
+        // Start is called before the first frame update
+        void Start()
+        {
+            StudyManager.ChangeCondition.AddListener(SetupCondition);
+            StudyManager.StartCondition.AddListener(StartExperiment);
+        }
+
+        // Update is called once per frame
+        void Update()
+        {
+            if (currentCondition == null || !started)
+                return;
+
+            if (Vector3.SqrMagnitude(target - transform.position) < 0.01f)
+            {
+                target.x = Random.Range(-5, 5);
+                target.y = Random.Range(-5, 5);
+                target.z = Random.Range(-5, 5);
+            }
+            
+            switch (currentCondition.movement)
+            {
+                case SampleCondition.MovementType.randomMovement:
+                    transform.position = Vector3.MoveTowards(transform.position, target, Time.deltaTime * slowSpeed);
+                    break;
+                case SampleCondition.MovementType.fastRandomMovement:
+                    transform.position = Vector3.MoveTowards(transform.position, target, Time.deltaTime * fastSpeed);
+                    break;
+            }
+        }
+
+        private void StartExperiment(SampleCondition arg0, int arg1)
+        {
+            started = true;
+        }
+
+        void SetupCondition(SampleCondition cond, int partId)
+        {
+            currentCondition = cond;
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/Sample/Scripts/TestObjectMovement.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6b5b374565160204685f32346064cc9d
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/schoenlogger/Scripts.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 437e562ac75b19641b2a5c95679a438a
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Assets/schoenlogger/Scripts/Condition.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using UnityEngine;
+
+namespace SchoenLogger
+{
+    [Serializable]
+    public abstract class Condition : CsvCompatible
+    {
+    }
+}

+ 11 - 0
Assets/schoenlogger/Scripts/Condition.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fc5a53e9245dcb748a0aa7d090b7860c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 64 - 0
Assets/schoenlogger/Scripts/CsvCompatible.cs

@@ -0,0 +1,64 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using UnityEngine;
+
+namespace SchoenLogger
+{
+    public class CsvCompatible
+    {
+        const BindingFlags Bindings = BindingFlags.Public |
+                                      BindingFlags.NonPublic |
+                                      BindingFlags.Instance;
+    
+        public virtual string ToCsv()
+        {
+            StringBuilder csvString = new StringBuilder();
+
+            FieldInfo[] fields = this.GetType()
+                .GetFields(Bindings)
+                .ToArray();
+
+            foreach (FieldInfo fieldInfo in fields)
+            {
+                if (Attribute.IsDefined(fieldInfo, typeof(SerializeField)))
+                {
+                    if (fieldInfo.FieldType == typeof(float))
+                    {
+                        csvString.Append(";" + ((float)fieldInfo.GetValue(this)).ToString("G", CultureInfo.InvariantCulture));
+                        continue;
+                    }
+                    
+                    if (fieldInfo.FieldType == typeof(double))
+                    {
+                        csvString.Append(";" + ((double)fieldInfo.GetValue(this)).ToString("G", CultureInfo.InvariantCulture));
+                        continue;
+                    }
+                    
+                    csvString.Append(";" + fieldInfo.GetValue(this).ToString());
+                }
+            }
+            
+            return csvString.ToString();
+        }
+
+        public static string GetCsvHeader<T>()
+        {
+            StringBuilder headerString = new StringBuilder();
+
+            FieldInfo[] fields = typeof(T)
+                .GetFields(Bindings)
+                .ToArray();
+
+            foreach (FieldInfo fieldInfo in fields)
+            {
+                if (Attribute.IsDefined(fieldInfo, typeof(SerializeField)))
+                    headerString.Append(";" + fieldInfo.Name);
+            }
+            
+            return headerString.ToString();
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/Scripts/CsvCompatible.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7528bd5c53490a14c8193f448b70b66a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 10 - 0
Assets/schoenlogger/Scripts/LogEntry.cs

@@ -0,0 +1,10 @@
+using System;
+
+namespace SchoenLogger
+{
+    [Serializable]
+    public abstract class LogEntry : CsvCompatible
+    {
+    }
+}
+

+ 11 - 0
Assets/schoenlogger/Scripts/LogEntry.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 007a0a3e892e9c448a58687c6888cfe6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 146 - 0
Assets/schoenlogger/Scripts/Logger.cs

@@ -0,0 +1,146 @@
+using UnityEngine;
+using System.IO;
+using System.Text;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SchoenLogger
+{
+    public class Logger<TLogEntry, TCondition> : MonoBehaviour, ILogger where TLogEntry : LogEntry, new() where TCondition : Condition , new()
+    {
+        [Header("General Settings")]
+        public StudyManager<TCondition> studyManager;
+        [Tooltip("Keep empty to autofill to PersistentDataPath")]
+        public string LogPathOverride= "";
+        [Tooltip("Buffersize (in bytes) for the LogFileWriter. Larger means less writing cycles")]
+        public int BufferSize = 65536;
+        
+        private string LogPath = "";
+        private string LogFilePath = "";
+        private string LogFileName = "";
+        private FileStream LogFileStream;
+        private StreamWriter LogFileWriter;
+        private string CurrentConditionString = "";
+        private int CurrentParticipantId = -1;
+        
+        // Start is called before the first frame update
+        void Start()
+        {
+            StartLogFileStream();
+
+            if (studyManager == null)
+            {
+                studyManager.GetComponent<StudyManager<TCondition>>();
+                if (studyManager == null)
+                {
+                    Debug.LogErrorFormat("{0} has not set studyManager", this.gameObject.name);
+                    return;
+                }
+            }
+            studyManager.ChangeCondition.AddListener(OnConditionChanged);
+        }
+
+        private void OnConditionChanged(TCondition cond, int partId)
+        {
+            CurrentConditionString = cond.ToCsv();
+            CurrentParticipantId = partId;
+        }
+        
+        private void OnApplicationQuit()
+        {
+            LogFileStream.Flush();
+            LogFileWriter?.Dispose();
+            LogFileStream?.Dispose();
+            Debug.Log("Closed Logger FileStreams!");
+        }
+
+        protected void StartLogFileStream()
+        {
+            if(LogPathOverride == "")
+                LogPath = Application.persistentDataPath;
+            else
+                LogPath = LogPathOverride;
+
+            LogFileName = "log_" + typeof(TLogEntry).Name + ".csv";
+            LogFilePath = Path.Combine(LogPath, LogFileName);
+
+            if (!File.Exists(LogFilePath))
+            {
+                using (FileStream stream = File.Open(LogFilePath, FileMode.Create))
+                {
+                    using (StreamWriter writer = new StreamWriter(stream))
+                    {
+                        writer.WriteLine(GetLogFileHeader());
+                        writer.Flush();
+                    }
+                }
+                
+                Debug.LogFormat("Created new Logfile {0}", LogFileName);
+            }
+            
+            LogFileStream = File.Open(LogFilePath, FileMode.Append);
+            LogFileWriter = new StreamWriter(LogFileStream, Encoding.UTF8, BufferSize);
+            LogFileWriter.AutoFlush = true;
+        }
+
+        protected string GetLogFileHeader()
+        {
+            StringBuilder header = new StringBuilder("ParticipantID");
+            header.Append(Condition.GetCsvHeader<TCondition>());
+            header.Append(LogEntry.GetCsvHeader<TLogEntry>());
+            return header.ToString();
+        }
+
+        public void Log(TLogEntry entry)
+        {
+            string logEntry = CreateLogEntryCsvLine(entry);
+            LogFileWriter.WriteLine(CreateLogEntryCsvLine(entry));
+            Debug.Log(logEntry);
+        }
+
+        private string CreateLogEntryCsvLine(TLogEntry entry)
+        {
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.Append(CurrentParticipantId);
+            stringBuilder.Append(CurrentConditionString);
+            stringBuilder.Append(entry.ToCsv());
+
+            return stringBuilder.ToString();
+        }
+
+        public string GetLogPath()
+        {
+            if (LogPath == "")
+                return Application.persistentDataPath;
+            
+            return LogPath;
+        }
+    }
+
+    public interface ILogger
+    {
+        string GetLogPath();
+    }
+
+#if UNITY_EDITOR
+    [CustomEditor(typeof(Logger<,>), true)]
+    public class LoggerEditor : Editor
+    {
+        public override void OnInspectorGUI()
+        {
+            DrawDefaultInspector();
+            ILogger Target = (ILogger)target;
+
+            EditorGUILayout.Space(10);
+            EditorGUILayout.LabelField("Info", EditorStyles.boldLabel);
+            EditorGUILayout.LabelField("Log Path: ", Target.GetLogPath());
+            if (GUILayout.Button("Show in Explorer"))
+            {
+                string itemPath = Target.GetLogPath().Replace(@"/", @"\");
+                System.Diagnostics.Process.Start("explorer.exe", "/select,"+itemPath);
+            }
+        }
+    }
+#endif
+}

+ 11 - 0
Assets/schoenlogger/Scripts/Logger.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bc73ad4520362b644910d908fad4d5f2
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/schoenlogger/Scripts/Singleton.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEngine;
+
+namespace SchoenLogger
+{
+    public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour
+    {
+        private static readonly Lazy<T> LazyInstance = new Lazy<T>(CreateSingleton);
+
+        public static T Instance => LazyInstance.Value;
+
+        private static T CreateSingleton()
+        {
+            var ownerObject = new GameObject($"{typeof(T).Name} (singleton)");
+            var instance = ownerObject.AddComponent<T>();
+            DontDestroyOnLoad(ownerObject);
+            return instance;
+        }
+    }
+}

+ 11 - 0
Assets/schoenlogger/Scripts/Singleton.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: eeae0510ceb621f499f1ab8ab9f12455
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 113 - 0
Assets/schoenlogger/Scripts/StudyManager.cs

@@ -0,0 +1,113 @@
+using UnityEngine;
+using UnityEngine.Events;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SchoenLogger
+{
+    public abstract class StudyManager<TCondition> : MonoBehaviour, IStudyManager where TCondition : Condition, new()
+    {
+        [Header("Study Settings")]
+        public int ParticipantId = -1;
+        [Header("Study Events")]
+        public UnityEvent<TCondition, int> ChangeCondition;
+        public UnityEvent<TCondition, int> StartCondition;
+        
+        [Header("Misc")]
+        [SerializeField]
+        protected bool EnableConsoleLogging = false;
+        protected TCondition[] Conditions;
+        protected int CurrentConditionIndex = -1;
+    
+        // Start is called before the first frame update
+        void Start()
+        {
+            CreateConditions(ref Conditions);
+        }
+
+        /// <summary>
+        /// Creates all possible Conditions
+        /// </summary>
+        /// <param name="conditions"></param>
+        protected abstract void CreateConditions(ref TCondition[] conditions);
+
+        public void RaiseNextCondition()
+        {
+            CurrentConditionIndex++;
+            if (CurrentConditionIndex >= Conditions.Length)
+                return;
+
+            ChangeCondition?.Invoke(Conditions[CurrentConditionIndex], ParticipantId);
+            
+            if(EnableConsoleLogging)
+                Debug.LogFormat("Changed Condition to {0}!", CurrentConditionIndex);
+        }
+
+        public void RaiseStartCondition()
+        {
+            StartCondition?.Invoke(Conditions[CurrentConditionIndex], ParticipantId);
+            
+            if(EnableConsoleLogging)
+                Debug.LogFormat("Started Condition! {0}", Conditions[CurrentConditionIndex].ToCsv());
+        }
+
+        public string GetConditionCountString()
+        {
+            if (Conditions == null || !Application.isPlaying)
+                return "Only available on play";
+
+            return Conditions.Length.ToString();
+        }
+
+        public int GetCurrentConditionIndex()
+        {
+            return CurrentConditionIndex;
+        }
+    }
+
+    public interface IStudyManager
+    {
+        void RaiseNextCondition();
+
+        void RaiseStartCondition();
+
+        string GetConditionCountString();
+
+        int GetCurrentConditionIndex();
+    }
+    
+#if UNITY_EDITOR
+    [CustomEditor(typeof(StudyManager<>), true)]
+    public class StudyManagerEditor : Editor
+    {
+        public override void OnInspectorGUI()
+        {
+            DrawDefaultInspector();
+            IStudyManager Target = (IStudyManager)target;
+
+            //EditorGUILayout.Space(10);
+            //EditorGUILayout.LabelField("Manage Conditions", EditorStyles.boldLabel);
+            EditorGUILayout.LabelField("Defined Conditions: ", Target.GetConditionCountString());
+            EditorGUILayout.LabelField("Current Condition: ", Target.GetCurrentConditionIndex().ToString());
+            EditorGUILayout.Space(5);
+            EditorGUILayout.LabelField("Controlls", EditorStyles.boldLabel);
+            GUILayout.BeginHorizontal();
+            if (GUILayout.Button("Setup next Condition"))
+            {
+                Target.RaiseNextCondition();
+            }
+            if (GUILayout.Button("Setup & start next Condition"))
+            {
+                Target.RaiseNextCondition();
+                Target.RaiseStartCondition();
+            }
+            GUILayout.EndHorizontal();
+            if (GUILayout.Button("StartCondition"))
+            {
+                Target.RaiseStartCondition();
+            }
+        }
+    }
+#endif
+}

+ 11 - 0
Assets/schoenlogger/Scripts/StudyManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2db518c0b2a3f0441a4db7ed684db6d5
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

Plik diff jest za duży
+ 4 - 3
SteamVR.csproj


Plik diff jest za duży
+ 4 - 3
SteamVR_Editor.csproj


Plik diff jest za duży
+ 4 - 3
SteamVR_Input_Editor.csproj


Plik diff jest za duży
+ 4 - 3
SteamVR_Windows_EditorHelper.csproj


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików