From d2c23b13cf7e2ea4f51c9eba1f1c127102aefea3 Mon Sep 17 00:00:00 2001 From: Leinadix <79761215+Leinadix@users.noreply.github.com> Date: Thu, 18 Sep 2025 03:50:04 +0200 Subject: [PATCH] fixed null ref error --- Assets/Prefabs/Connection.prefab | 10 +++++----- Assets/Prefabs/Point.prefab | 8 ++++---- Assets/Scripts/GameManager.cs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/Prefabs/Connection.prefab b/Assets/Prefabs/Connection.prefab index 7fed1fa..cf3ee47 100644 --- a/Assets/Prefabs/Connection.prefab +++ b/Assets/Prefabs/Connection.prefab @@ -75,7 +75,7 @@ LineRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 4a4408a7228b2cb49bce2208230bbd69, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -111,7 +111,7 @@ LineRenderer: m_Curve: - serializedVersion: 3 time: 0 - value: 0.3 + value: 0.18 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -120,7 +120,7 @@ LineRenderer: outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 0.3 + value: 0.18 inSlope: 0 outSlope: 0 tangentMode: 0 @@ -132,8 +132,8 @@ LineRenderer: m_RotationOrder: 4 colorGradient: serializedVersion: 2 - key0: {r: 0.4627451, g: 0.4627451, b: 0.4627451, a: 1} - key1: {r: 0.4627451, g: 0.4627451, b: 0.4627451, a: 1} + key0: {r: 0.2, g: 0.2, b: 0.2, a: 1} + key1: {r: 0.2, g: 0.2, b: 0.2, a: 1} key2: {r: 0, g: 0, b: 0, a: 0} key3: {r: 0, g: 0, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0} diff --git a/Assets/Prefabs/Point.prefab b/Assets/Prefabs/Point.prefab index 8aed7a4..bc226f9 100644 --- a/Assets/Prefabs/Point.prefab +++ b/Assets/Prefabs/Point.prefab @@ -25,7 +25,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1882714990603045140} - m_LocalRotation: {x: 0.067298695, y: -0.6646487, z: 0.06030975, w: 0.7416709} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 1.96} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -60,7 +60,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + - {fileID: -2723583854633709972, guid: e01dc04fc20642041aebeaef670ef411, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -104,8 +104,8 @@ MonoBehaviour: m_Calls: [] m_text: 0 m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontAsset: {fileID: 11400000, guid: e01dc04fc20642041aebeaef670ef411, type: 2} + m_sharedMaterial: {fileID: -2723583854633709972, guid: e01dc04fc20642041aebeaef670ef411, type: 2} m_fontSharedMaterials: [] m_fontMaterial: {fileID: 0} m_fontMaterials: [] diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index e7659f7..6400b7d 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -115,7 +115,7 @@ public class GameManager : MonoBehaviour } public List GetNodes() => NodeParent.GetComponentsInChildren().ToList(); - public List GetConnections() => ConnectionParent.GetComponentsInChildren().ToList(); + public List GetConnections() => ConnectionParent?.GetComponentsInChildren().ToList() ?? new(); public void ExecuteRoundEnd() {