From 2dbc2bcb3ab3abb8b586dbd2111d799df91370c7 Mon Sep 17 00:00:00 2001
From: Sylvain Renault <sylvain.renault@hhi.fraunhofer.de>
Date: Mon, 10 Mar 2025 21:23:58 +0100
Subject: [PATCH] Short update for the HHI use case.

---
 .../Scenes/ExampleServerMaintenance HHI.unity   | 14 +++++++-------
 .../ISG-ARF/HHI/Scripts/NavigationSimulation.cs |  6 +++---
 Assets/Plugins/Android/proguard-user.txt        | 17 +++++++++++++++++
 3 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/Assets/ISG-ARF/HHI/Scenes/ExampleServerMaintenance HHI.unity b/Assets/ISG-ARF/HHI/Scenes/ExampleServerMaintenance HHI.unity
index f44b2bb..bcd2897 100644
--- a/Assets/ISG-ARF/HHI/Scenes/ExampleServerMaintenance HHI.unity	
+++ b/Assets/ISG-ARF/HHI/Scenes/ExampleServerMaintenance HHI.unity	
@@ -3137,7 +3137,7 @@ BoxCollider:
   m_LayerOverridePriority: 0
   m_IsTrigger: 0
   m_ProvidesContacts: 0
-  m_Enabled: 1
+  m_Enabled: 0
   serializedVersion: 3
   m_Size: {x: 1, y: 1, z: 1}
   m_Center: {x: 0, y: 0, z: 0}
@@ -7508,7 +7508,7 @@ Transform:
   m_GameObject: {fileID: 578729963}
   serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -4.22, y: 0, z: -3.43}
+  m_LocalPosition: {x: -4.22, y: 0, z: -3.26}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 1
   m_Children: []
@@ -13237,7 +13237,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 4960913308518330449, guid: 963b966102b143644ae6021e9ea1d4d4, type: 3}
       propertyPath: m_LocalPosition.x
-      value: 4.124
+      value: 3.74
       objectReference: {fileID: 0}
     - target: {fileID: 4960913308518330449, guid: 963b966102b143644ae6021e9ea1d4d4, type: 3}
       propertyPath: m_LocalPosition.y
@@ -13245,7 +13245,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 4960913308518330449, guid: 963b966102b143644ae6021e9ea1d4d4, type: 3}
       propertyPath: m_LocalPosition.z
-      value: 3.56
+      value: 3.18
       objectReference: {fileID: 0}
     - target: {fileID: 4960913308518330449, guid: 963b966102b143644ae6021e9ea1d4d4, type: 3}
       propertyPath: m_LocalRotation.w
@@ -18823,7 +18823,7 @@ Transform:
   m_GameObject: {fileID: 1483690224}
   serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -28.49, y: 0, z: 5.1}
+  m_LocalPosition: {x: -28.3, y: 0, z: 4.79}
   m_LocalScale: {x: 0.9, y: 0.9, z: 0.9}
   m_ConstrainProportionsScale: 1
   m_Children:
@@ -19783,7 +19783,7 @@ Transform:
   m_GameObject: {fileID: 1567633173}
   serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: -24.96, y: 0, z: 7.73}
+  m_LocalPosition: {x: -24.96, y: 0, z: 7.3}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 1
   m_Children:
@@ -21779,7 +21779,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 5799561996261335259, guid: b69957b197a55024f8014f6751c0a7a9, type: 3}
       propertyPath: m_LocalPosition.z
-      value: -1.21
+      value: -1.53
       objectReference: {fileID: 0}
     - target: {fileID: 5799561996261335259, guid: b69957b197a55024f8014f6751c0a7a9, type: 3}
       propertyPath: m_LocalRotation.w
diff --git a/Assets/ISG-ARF/HHI/Scripts/NavigationSimulation.cs b/Assets/ISG-ARF/HHI/Scripts/NavigationSimulation.cs
index 1991c16..562d852 100644
--- a/Assets/ISG-ARF/HHI/Scripts/NavigationSimulation.cs
+++ b/Assets/ISG-ARF/HHI/Scripts/NavigationSimulation.cs
@@ -46,18 +46,18 @@ public class NavigationSimulation : MonoBehaviour
         // Check if the collided object is the current checkpoint
         string n = checkpoints[currentCheckpointIndex].name;
 
-        int id = int.Parse(collision.gameObject.name.Split(' ')[2]);
         int id_content = int.Parse(checkpoints[currentCheckpointIndex].name.Split(' ')[1]);
+        int id = int.Parse(collision.gameObject.name.Split(' ')[2]);
 
         if (id == id_content)
         {
             // Deactivate the current checkpoint
-            if (currentCheckpointIndex != 0) DeactivateCheckpoint(currentCheckpointIndex);
+            if (currentCheckpointIndex > 0) DeactivateCheckpoint(currentCheckpointIndex);
 
             // Check if there are more checkpoints
             if (currentCheckpointIndex < checkpoints.Length)
             {
-                if (currentCheckpointIndex < checkpoints.Length - 1) currentCheckpointIndex++;
+                currentCheckpointIndex++;
 
                 // Activate the next checkpoint
                 checkpointText.text = "Checkpoint " + currentCheckpointIndex;
diff --git a/Assets/Plugins/Android/proguard-user.txt b/Assets/Plugins/Android/proguard-user.txt
index 54a079f..7b7e0dc 100644
--- a/Assets/Plugins/Android/proguard-user.txt
+++ b/Assets/Plugins/Android/proguard-user.txt
@@ -83,3 +83,20 @@
                     -keep class com.google.android.gms.tasks.** { *; }
 
 ### Module Progurad Rules ends ###
+
+### Module Progurad Rules starts ###
+
+## Default ##
+-keep class com.unity3d.plugin.* { *; }
+
+## LocationModule ##
+-keep class com.google.android.gms.common.** { *; }
+                    -keep class com.google.android.gms.location.** { *; }
+                    -keep class com.google.android.gms.tasks.** { *; }
+
+## AuthenticationModule ##
+-keep class com.google.android.gms.common.** { *; }
+                    -keep class com.google.android.gms.auth.** { *; }
+                    -keep class com.google.android.gms.tasks.** { *; }
+
+### Module Progurad Rules ends ###
-- 
GitLab