From 94f77c2918412df07faddbe7cffbc5d0d870739e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A1rk=C3=B6zi=20Gergely=20J=C3=A1nos?=
 <cycss7@inf.elte.hu>
Date: Tue, 3 May 2022 23:26:36 +0200
Subject: [PATCH] better camera position, fix random world size

---
 Assets/Scenes/Simulation.unity                         | 2 +-
 Assets/Scripts/Presentation/World/SimulationManager.cs | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Assets/Scenes/Simulation.unity b/Assets/Scenes/Simulation.unity
index 220b736..665cb3b 100644
--- a/Assets/Scenes/Simulation.unity
+++ b/Assets/Scenes/Simulation.unity
@@ -471,7 +471,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 519420028}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 2, y: -5, z: -10}
+  m_LocalPosition: {x: 2, y: -4, z: -10}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 0}
diff --git a/Assets/Scripts/Presentation/World/SimulationManager.cs b/Assets/Scripts/Presentation/World/SimulationManager.cs
index db2dd02..1d73bb9 100644
--- a/Assets/Scripts/Presentation/World/SimulationManager.cs
+++ b/Assets/Scripts/Presentation/World/SimulationManager.cs
@@ -39,8 +39,12 @@ public class SimulationManager : MonoBehaviour {
 			Debug.LogError($"[Logic Exception]: ${e} {e.InnerException}");
 		}
 
+		//Clone the ScriptableObject: it calculates and caches a random value,
+		//  which shouldn't be persisted between separate games.
+		WorldConfig worldConfigClone = Instantiate(worldConfig);
+
 		GameOverview = new GameOverview(ExceptionHandler, Random.Range(0, 9999),
-			overviewConfig, economyConfig, worldConfig);
+			overviewConfig, economyConfig, worldConfigClone);
 	}
 
 	private void Start() {
-- 
GitLab