Skip to content

Commit 5cd1a22

Browse files
committed
Fix: add SettingsPanelCanvasUITK to PostGameState prefab and fix component assignment in script
1 parent f6db0cc commit 5cd1a22

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Assets/Prefabs/State/PostGameState.prefab

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Transform:
2727
m_PrefabInstance: {fileID: 0}
2828
m_PrefabAsset: {fileID: 0}
2929
m_GameObject: {fileID: 7475764267130300177}
30+
serializedVersion: 2
3031
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
3132
m_LocalPosition: {x: 0, y: 0, z: 0}
3233
m_LocalScale: {x: 1, y: 1, z: 1}
3334
m_ConstrainProportionsScale: 0
3435
m_Children: []
3536
m_Father: {fileID: 0}
36-
m_RootOrder: 0
3737
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
3838
--- !u!114 &-1007214952234040975
3939
MonoBehaviour:
@@ -47,13 +47,19 @@ MonoBehaviour:
4747
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
4848
m_Name:
4949
m_EditorClassIdentifier:
50-
GlobalObjectIdHash: 951099334
50+
GlobalObjectIdHash: 4221458659
51+
InScenePlacedSourceGlobalObjectIdHash: 2795900295
52+
DeferredDespawnTick: 0
53+
Ownership: 1
5154
AlwaysReplicateAsRoot: 0
5255
SynchronizeTransform: 0
5356
ActiveSceneSynchronization: 0
5457
SceneMigrationSynchronization: 1
58+
SpawnWithObservers: 1
5559
DontDestroyWithOwner: 0
5660
AutoObjectParentSync: 1
61+
SyncOwnerTransformWhenParented: 1
62+
AllowOwnerToParent: 0
5763
--- !u!114 &7475764267130300178
5864
MonoBehaviour:
5965
m_ObjectHideFlags: 0
@@ -86,6 +92,7 @@ MonoBehaviour:
8692
m_Script: {fileID: 11500000, guid: 6aedfcf74b3f4f248897af16490caa9d, type: 3}
8793
m_Name:
8894
m_EditorClassIdentifier:
95+
ShowTopMostFoldoutHeaderGroup: 1
8996
--- !u!114 &6889826313803109754
9097
MonoBehaviour:
9198
m_ObjectHideFlags: 0
@@ -98,5 +105,6 @@ MonoBehaviour:
98105
m_Script: {fileID: 11500000, guid: d063751a18954cf1a9b98fc7a437b48d, type: 3}
99106
m_Name:
100107
m_EditorClassIdentifier:
108+
ShowTopMostFoldoutHeaderGroup: 1
101109
WinState:
102110
m_InternalValue: 0

Assets/Scripts/Gameplay/UI/UISettingsCanvas.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void Awake()
3434
// Retrieve the root VisualElement from the UIDocument
3535
var root = uiDocument.rootVisualElement;
3636
// get UIQuitPanel component which is attached to the same GameObject
37-
uiQuitPanel = GetComponent<UIQuitPanel>();
37+
uiQuitPanel = GetComponentInChildren<UIQuitPanel>();
3838
// Query the panels by their names or assigned USS classes
3939
settingsPanelRoot = root.Q<VisualElement>("settingsPanelRoot");
4040
quitPanelRoot = root.Q<VisualElement>("quitPanelRoot");

0 commit comments

Comments
 (0)