瀏覽代碼

UI Highlighting Selected Market Stall and submit to store in csv data

Furkan Karakocaoglu 2 年之前
父節點
當前提交
9b60624c6b

+ 14 - 0
testumgebung/CrowdModelling/Assets/Depictions_Years/Prefabs/Environment/Market_stall_Cube.prefab

@@ -12,6 +12,7 @@ GameObject:
   - component: {fileID: 2230880021112558515}
   - component: {fileID: 2230880021112558514}
   - component: {fileID: 11364256400490454}
+  - component: {fileID: 3608393216546591489}
   m_Layer: 13
   m_Name: Market_stall_Cube
   m_TagString: Untagged
@@ -98,6 +99,19 @@ MonoBehaviour:
   m_Area: 1
   m_IgnoreFromBuild: 0
   m_AffectedAgents: ffffffff
+--- !u!65 &3608393216546591489
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2230880021112558519}
+  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!1 &3559435402810562813
 GameObject:
   m_ObjectHideFlags: 0

+ 69 - 0
testumgebung/CrowdModelling/Assets/Depictions_Years/Scripts/Logging/CastingToObject.cs

@@ -0,0 +1,69 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class CastingToObject : MonoBehaviour
+{
+    [Header("Set Camera Perspective (cam1) and TopDown (cam2)")]
+    public Camera cam1;
+    public Camera cam2;
+    [Header("Set Layer Mask")]
+    public LayerMask layer;
+    [Header("Set Materials")]
+    public Material material;
+    public Material defaultMaterial;
+
+    private RaycastHit theObject;
+    private Camera currentCam;
+    private RaycastHit oldObject;
+
+    public static string theFinalObject;
+
+    private void Start()
+    {
+        currentCam = cam1;
+    }
+
+    public void OnChangeViewClicked()
+    {
+        if(currentCam == cam1)
+            currentCam = cam2;
+        else
+            currentCam = cam1;
+    }
+
+    // Update is called once per frame
+    void FixedUpdate()
+    {
+        if (Input.GetMouseButtonUp(0))
+        {
+            var ray = currentCam.ScreenPointToRay(Input.mousePosition);
+            if (Physics.Raycast(ray, out theObject, float.MaxValue, layer))
+            {
+                if(!theObject.Equals(oldObject))
+                {
+                    theObject.transform.gameObject.GetComponent<Renderer>().material = material;
+                    if(oldObject.transform != null)
+                        oldObject.transform.gameObject.GetComponent<Renderer>().material = defaultMaterial;
+                    
+                    oldObject = theObject;
+                    theFinalObject = theObject.transform.gameObject.name;
+                }
+                else
+                {
+                    theObject.transform.gameObject.GetComponent<Renderer>().material = defaultMaterial;
+
+                    oldObject = new RaycastHit();
+                }
+
+            }
+            else
+            {
+                if (oldObject.transform != null)
+                    oldObject.transform.gameObject.GetComponent<Renderer>().material = defaultMaterial;
+
+                oldObject = new RaycastHit();
+            }
+        }
+    }
+}

+ 11 - 0
testumgebung/CrowdModelling/Assets/Depictions_Years/Scripts/Logging/CastingToObject.cs.meta

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

+ 85 - 0
testumgebung/CrowdModelling/Assets/Depictions_Years/Scripts/Logging/HighlightingSelection.mat

@@ -0,0 +1,85 @@
+%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: HighlightingSelection
+  m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+  m_ShaderKeywords: _ALPHABLEND_ON
+  m_LightmapFlags: 4
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: -1
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _AlphaTex:
+        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}
+    - _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:
+    - PixelSnap: 0
+    - _BumpScale: 1
+    - _Cutoff: 0.5
+    - _DetailNormalMapScale: 1
+    - _DstBlend: 10
+    - _EnableExternalAlpha: 0
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Metallic: 0
+    - _Mode: 2
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 5
+    - _UVSec: 0
+    - _ZWrite: 0
+    m_Colors:
+    - _Color: {r: 1, g: 1, b: 0, a: 0.27058825}
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+    - _Flip: {r: 1, g: 1, b: 1, a: 1}
+    - _RendererColor: {r: 1, g: 1, b: 1, a: 1}

+ 8 - 0
testumgebung/CrowdModelling/Assets/Depictions_Years/Scripts/Logging/HighlightingSelection.mat.meta

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

+ 362 - 6
testumgebung/CrowdModelling/Assets/Scenes/Origin_OnlyYears.unity

@@ -1296,6 +1296,7 @@ GameObject:
   - component: {fileID: 231771155}
   - component: {fileID: 231771156}
   - component: {fileID: 231771157}
+  - component: {fileID: 231771158}
   m_Layer: 0
   m_Name: UILogging
   m_TagString: Untagged
@@ -1359,6 +1360,19 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   logFileName: TestPlayback
+--- !u!114 &231771158
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 231771153}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 44f9704de9064ed45879d2db71c4fe8b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  logFileName: TestSlider
 --- !u!1 &232631885
 GameObject:
   m_ObjectHideFlags: 0
@@ -5389,6 +5403,42 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   movingCamera: {fileID: 342493611}
   cameraLogFileName: TestCamera
+--- !u!1 &662991575
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 662991576}
+  m_Layer: 0
+  m_Name: Submit
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &662991576
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 662991575}
+  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:
+  - {fileID: 2040555400}
+  m_Father: {fileID: 1397859113}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 1, y: 1}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: -85, y: -40}
+  m_SizeDelta: {x: 150, y: 50}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &668424886
 GameObject:
   m_ObjectHideFlags: 0
@@ -5641,10 +5691,10 @@ RectTransform:
   m_Father: {fileID: 1397859113}
   m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 1, y: 1}
-  m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -85, y: -35}
-  m_SizeDelta: {x: 150, y: 50}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 80, y: -170}
+  m_SizeDelta: {x: 140, y: 50}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &705507993
 GameObject:
@@ -6067,6 +6117,17 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+      - m_Target: {fileID: 951352570}
+        m_MethodName: OnChangeViewClicked
+        m_Mode: 1
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: 
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!114 &730861552
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -6080,7 +6141,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 0.9, g: 0.9, b: 0.9, a: 1}
   m_RaycastTarget: 1
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -7956,6 +8017,84 @@ MonoBehaviour:
   m_Bidirectional: 0
   m_AutoUpdatePosition: 0
   m_Area: 0
+--- !u!1 &920012125
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 920012126}
+  - component: {fileID: 920012128}
+  - component: {fileID: 920012127}
+  m_Layer: 0
+  m_Name: Text
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &920012126
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 920012125}
+  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: 2040555400}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &920012127
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 920012125}
+  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: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+  m_RaycastTarget: 1
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+    m_FontSize: 30
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 2
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: Submit
+--- !u!222 &920012128
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 920012125}
+  m_CullTransparentMesh: 0
 --- !u!1 &923615040
 GameObject:
   m_ObjectHideFlags: 0
@@ -8374,6 +8513,70 @@ MonoBehaviour:
   thickness: 0.1
   material: {fileID: 2100000, guid: 0ede38197498365469907c23cb554452, type: 2}
   color: {r: 0.45490196, g: 0.4392157, b: 0.7019608, a: 1}
+--- !u!1 &951352567
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 951352568}
+  - component: {fileID: 951352569}
+  - component: {fileID: 951352570}
+  m_Layer: 0
+  m_Name: SelectionLogging
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &951352568
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 951352567}
+  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: 961836601}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &951352569
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 951352567}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3b95a07dd7912214b90bfb8e1c64141e, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  logFileName: TestMarketStallSelection
+--- !u!114 &951352570
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 951352567}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 27dffc23607345b4b966da87f1298f92, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  cam1: {fileID: 342493611}
+  cam2: {fileID: 990797726}
+  layer:
+    serializedVersion: 2
+    m_Bits: 32768
+  material: {fileID: 2100000, guid: 983c621f8ea75aa4fa716fa88e0e24db, type: 2}
+  defaultMaterial: {fileID: 2100000, guid: 5139e315f3291984fb5c28c72b20f998, type: 2}
 --- !u!1 &954172724
 GameObject:
   m_ObjectHideFlags: 0
@@ -8643,6 +8846,7 @@ Transform:
   - {fileID: 659003507}
   - {fileID: 1589197475}
   - {fileID: 231771154}
+  - {fileID: 951352568}
   m_Father: {fileID: 0}
   m_RootOrder: 10
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -11843,6 +12047,7 @@ RectTransform:
   - {fileID: 1981258668}
   - {fileID: 1410582205}
   - {fileID: 700847358}
+  - {fileID: 662991576}
   m_Father: {fileID: 0}
   m_RootOrder: 7
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -13217,6 +13422,17 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
+      - m_Target: {fileID: 231771158}
+        m_MethodName: registerOnValueChanged
+        m_Mode: 0
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: 
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!95 &1594303657
 Animator:
   serializedVersion: 3
@@ -16724,7 +16940,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 80, y: -70}
-  m_SizeDelta: {x: 130, y: 110}
+  m_SizeDelta: {x: 135, y: 110}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1981258669
 MonoBehaviour:
@@ -16913,6 +17129,136 @@ MonoBehaviour:
   m_Bidirectional: 0
   m_AutoUpdatePosition: 0
   m_Area: 0
+--- !u!1 &2040555399
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2040555400}
+  - component: {fileID: 2040555403}
+  - component: {fileID: 2040555402}
+  - component: {fileID: 2040555401}
+  m_Layer: 0
+  m_Name: Button
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &2040555400
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2040555399}
+  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:
+  - {fileID: 920012126}
+  m_Father: {fileID: 662991576}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2040555401
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2040555399}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 2040555402}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls:
+      - m_Target: {fileID: 951352569}
+        m_MethodName: OnSubmitClicked
+        m_Mode: 1
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: 
+          m_BoolArgument: 0
+        m_CallState: 2
+--- !u!114 &2040555402
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2040555399}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 0.9, g: 0.9, b: 0.9, a: 1}
+  m_RaycastTarget: 1
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!222 &2040555403
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2040555399}
+  m_CullTransparentMesh: 0
 --- !u!1 &2042858269
 GameObject:
   m_ObjectHideFlags: 0
@@ -17680,6 +18026,16 @@ PrefabInstance:
   m_Modification:
     m_TransformParent: {fileID: 837374203}
     m_Modifications:
+    - target: {fileID: 2346693484546143632, guid: a1c5531016777934caf8516c6994600c,
+        type: 3}
+      propertyPath: m_Materials.Array.data[0]
+      value: 
+      objectReference: {fileID: 2100000, guid: 5139e315f3291984fb5c28c72b20f998, type: 2}
+    - target: {fileID: 2346693484572343201, guid: a1c5531016777934caf8516c6994600c,
+        type: 3}
+      propertyPath: m_Materials.Array.data[0]
+      value: 
+      objectReference: {fileID: 2100000, guid: 5139e315f3291984fb5c28c72b20f998, type: 2}
     - target: {fileID: 4495873107578977606, guid: a1c5531016777934caf8516c6994600c,
         type: 3}
       propertyPath: m_Name

+ 87 - 0
testumgebung/CrowdModelling/Assets/Study_Logs/Scripts/MarketStallSelection.cs

@@ -0,0 +1,87 @@
+using System;
+using System.IO;
+using System.Text;
+using UnityEngine;
+using UnityEngine.UI;
+
+[RequireComponent(typeof(CastingToObject))]
+public class MarketStallSelection : MonoBehaviour
+{
+    // Inspector variables
+    public string logFileName = "";
+
+    // Get from LoggingManager
+    private int ParticipantID;
+    private string logPathFolder = "";
+
+    // Changes on click
+    private bool sendSelection = false;
+    private GameObject selectedMarketStall;
+
+    private string logPath;
+    private float time = 0f;
+
+    private void Start()
+    {
+        ParticipantID = gameObject.GetComponentInParent<LoggingManager>().ParticipantID;
+        logPathFolder = gameObject.GetComponentInParent<LoggingManager>().LogPathFolder;
+
+        logFileName = "log_" + ParticipantID + "_" + logFileName + ".csv";
+        logPath = Path.Combine(logPathFolder, logFileName);
+
+        using (FileStream stream = File.Open(logPath, FileMode.Create))
+        {
+            using (StreamWriter writer = new StreamWriter(stream))
+            {
+                writer.WriteLine(GetLogFileHeader());
+                writer.Flush();
+            }
+        }
+        Debug.Log("Created new Logfile " + logFileName);
+    }
+
+    private string GetLogFileHeader()
+    {
+        StringBuilder header = new StringBuilder("ParticipantID");
+        header.Append(";Time");
+        header.Append(";Selected Market Stall");
+
+        return header.ToString();
+    }
+
+    public void OnSubmitClicked()
+    {
+        sendSelection = true;
+        selectedMarketStall = GameObject.Find(CastingToObject.theFinalObject);
+    }
+
+    private void FixedUpdate()
+    {
+        if (sendSelection)
+        {
+            if (File.Exists(logPath))
+            {
+                try
+                {
+                    using (StreamWriter writer = new StreamWriter(logPath, true))
+                    {
+                        StringBuilder line = new StringBuilder();
+                        line.Append(ParticipantID);
+                        line.Append(";" + time);
+                        line.Append(";" + selectedMarketStall);
+
+                        writer.WriteLine(line);
+                        writer.Flush();
+                    }
+                }
+                catch (Exception e)
+                {
+                    throw new ApplicationException("Something went wrong by writing into a csv file: ", e);
+                }
+            }
+            Debug.Log("Submission successful! Selected Market Stall: " + selectedMarketStall);
+            sendSelection = false;
+        }
+        time += Time.deltaTime;
+    }
+}

+ 11 - 0
testumgebung/CrowdModelling/Assets/Study_Logs/Scripts/MarketStallSelection.cs.meta

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

+ 0 - 1
testumgebung/CrowdModelling/Assets/Study_Logs/Scripts/UITimePeriodSelection.cs

@@ -20,7 +20,6 @@ public class UITimePeriodSelection : MonoBehaviour
 
     // Changes on click
     private bool allOn = false;
-    private int consideredDay = 0;
     private float timerDay1 = 0f;
     private float timerDay2 = 0f;
     private float timerDay3 = 0f;

+ 2 - 0
testumgebung/CrowdModelling/Assets/Study_Logs/log_0_TestMarketStallSelection.csv

@@ -0,0 +1,2 @@
+ParticipantID;Time;Selected Market Stall
+0;3,579997;Market_stall_Cube (7) (UnityEngine.GameObject)

+ 7 - 0
testumgebung/CrowdModelling/Assets/Study_Logs/log_0_TestMarketStallSelection.csv.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 54d6b58c9ec6cf54daf71eb52194ede2
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: