From 089a9bd725374e5300dcaef755ee0594fd43fe82 Mon Sep 17 00:00:00 2001
From: mhby1g21 <mhby1g21@soton.ac.uk>
Date: Fri, 6 Dec 2024 15:14:07 +0000
Subject: [PATCH] reverted changes to make it working on editor again, can
 build but doesnt work in builds

---
 AVVR/Assets/Scenes/MenuInterface.unity |  6 ++++--
 AVVR/Assets/_Scripts/Import Scenery.cs | 15 +++++----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/AVVR/Assets/Scenes/MenuInterface.unity b/AVVR/Assets/Scenes/MenuInterface.unity
index d27ea72..9c04b27 100644
--- a/AVVR/Assets/Scenes/MenuInterface.unity
+++ b/AVVR/Assets/Scenes/MenuInterface.unity
@@ -1655,6 +1655,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   labelledInputValidators: []
   buildButton: {fileID: 1288695414}
+  interactableAudioSourcePrefab: {fileID: 1342686809196105485, guid: e8704b2cb89ef5f4c900ad41600ea441, type: 3}
 --- !u!114 &235670130
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2194,6 +2195,7 @@ MonoBehaviour:
   - name: speakers
     inputValidator: {fileID: 8551979803024852529}
   buildButton: {fileID: 1673999060}
+  interactableAudioSourcePrefab: {fileID: 1342686809196105485, guid: e8704b2cb89ef5f4c900ad41600ea441, type: 3}
 --- !u!1 &615529042
 GameObject:
   m_ObjectHideFlags: 0
@@ -5898,8 +5900,8 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 579, y: 0}
-  m_SizeDelta: {x: 1138, y: 0}
+  m_AnchoredPosition: {x: 705, y: 0}
+  m_SizeDelta: {x: 1390, y: 0}
   m_Pivot: {x: 0.5, y: 1}
 --- !u!114 &2044274857
 MonoBehaviour:
diff --git a/AVVR/Assets/_Scripts/Import Scenery.cs b/AVVR/Assets/_Scripts/Import Scenery.cs
index 265b852..fbebf1f 100644
--- a/AVVR/Assets/_Scripts/Import Scenery.cs	
+++ b/AVVR/Assets/_Scripts/Import Scenery.cs	
@@ -1,10 +1,9 @@
+
 using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using UnityEngine;
 using Dummiesman;
-
-[ExecuteInEditMode]
 public class ImportScenery : MonoBehaviour
 {
     #if UNITY_EDITOR
@@ -14,9 +13,7 @@ public class ImportScenery : MonoBehaviour
         try
         {
             // hide demo lidar overlay
-            #if UNITY_EDITOR
             LoadDemo.ShowLIDAR(false);
-            #endif
         }
         catch (System.Exception e)
         {
@@ -25,7 +22,6 @@ public class ImportScenery : MonoBehaviour
 
         // call get new mesh to obtain obj file, then perform import automation
         ImportScene(GetNewMesh());
-        
     }
     #endif
 
@@ -33,9 +29,9 @@ public class ImportScenery : MonoBehaviour
     {
         if (AVVRScene == null)
         {
-            #if UNITY_EDITOR
+#if UNITY_EDITOR
             UnityEditor.EditorUtility.DisplayDialog("Import cancelled!", "Invalid file (.obj file required).", "OK");
-            #endif
+#endif
         }
         else
         {
@@ -138,7 +134,7 @@ public class ImportScenery : MonoBehaviour
         }
     }
 
-    #if UNITY_EDITOR
+#if UNITY_EDITOR
     static GameObject GetNewMesh()
     {
         // starts in default folder for pipeline output        
@@ -161,8 +157,7 @@ public class ImportScenery : MonoBehaviour
             return null;
         }
     }
-    #endif
-
+#endif
     public static GameObject GetNewMesh(string objPath, string mtlPath)
     {
         if (objPath == null || objPath == "" || !objPath.EndsWith(".obj"))
-- 
GitLab