fixed null ref error

This commit is contained in:
Leinadix 2025-09-18 03:50:04 +02:00
parent 466c6004a5
commit d2c23b13cf
3 changed files with 10 additions and 10 deletions

View file

@ -75,7 +75,7 @@ LineRenderer:
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
- {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 2100000, guid: 4a4408a7228b2cb49bce2208230bbd69, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -111,7 +111,7 @@ LineRenderer:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 0.3 value: 0.18
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 0 tangentMode: 0
@ -120,7 +120,7 @@ LineRenderer:
outWeight: 0.33333334 outWeight: 0.33333334
- serializedVersion: 3 - serializedVersion: 3
time: 1 time: 1
value: 0.3 value: 0.18
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 0 tangentMode: 0
@ -132,8 +132,8 @@ LineRenderer:
m_RotationOrder: 4 m_RotationOrder: 4
colorGradient: colorGradient:
serializedVersion: 2 serializedVersion: 2
key0: {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.4627451, g: 0.4627451, b: 0.4627451, a: 1} key1: {r: 0.2, g: 0.2, b: 0.2, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0} key2: {r: 0, g: 0, b: 0, a: 0}
key3: {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} key4: {r: 0, g: 0, b: 0, a: 0}

View file

@ -25,7 +25,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1882714990603045140} 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_LocalPosition: {x: 0, y: 0, z: 1.96}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -60,7 +60,7 @@ MeshRenderer:
m_RenderingLayerMask: 1 m_RenderingLayerMask: 1
m_RendererPriority: 0 m_RendererPriority: 0
m_Materials: m_Materials:
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} - {fileID: -2723583854633709972, guid: e01dc04fc20642041aebeaef670ef411, type: 2}
m_StaticBatchInfo: m_StaticBatchInfo:
firstSubMesh: 0 firstSubMesh: 0
subMeshCount: 0 subMeshCount: 0
@ -104,8 +104,8 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_text: 0 m_text: 0
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: e01dc04fc20642041aebeaef670ef411, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: -2723583854633709972, guid: e01dc04fc20642041aebeaef670ef411, type: 2}
m_fontSharedMaterials: [] m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0} m_fontMaterial: {fileID: 0}
m_fontMaterials: [] m_fontMaterials: []

View file

@ -115,7 +115,7 @@ public class GameManager : MonoBehaviour
} }
public List<Node> GetNodes() => NodeParent.GetComponentsInChildren<Node>().ToList(); public List<Node> GetNodes() => NodeParent.GetComponentsInChildren<Node>().ToList();
public List<Connection> GetConnections() => ConnectionParent.GetComponentsInChildren<Connection>().ToList(); public List<Connection> GetConnections() => ConnectionParent?.GetComponentsInChildren<Connection>().ToList() ?? new();
public void ExecuteRoundEnd() public void ExecuteRoundEnd()
{ {