From b49d1a686b1e84e21ceb00b42de19c9c0df98f9c Mon Sep 17 00:00:00 2001 From: Marine Date: Sat, 27 Jan 2024 18:18:03 +0100 Subject: [PATCH] fix btn interactable --- Assets/Scenes/PhoneView.unity | 52 +++++++++++++++++++++++++++++++++-- Assets/Scripts/GameManager.cs | 4 +-- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/Assets/Scenes/PhoneView.unity b/Assets/Scenes/PhoneView.unity index a4b4f93..250c091 100644 --- a/Assets/Scenes/PhoneView.unity +++ b/Assets/Scenes/PhoneView.unity @@ -198,6 +198,53 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 105416810} m_CullTransparentMesh: 1 +--- !u!1 &157909813 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 157909815} + - component: {fileID: 157909814} + m_Layer: 0 + m_Name: RoomCreator + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &157909814 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 157909813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de098f8fd5f884a1aa55db7874246b92, type: 3} + m_Name: + m_EditorClassIdentifier: + propositionTime: 60 + votingTime: 20 + roomCodeLabel: {fileID: 0} +--- !u!4 &157909815 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 157909813} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 117.24013, y: 248.68315, z: -1.7392539} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &162738918 GameObject: m_ObjectHideFlags: 0 @@ -2789,7 +2836,7 @@ MonoBehaviour: m_Calls: - m_Target: {fileID: 1202782732} m_TargetAssemblyTypeName: GameManager, Assembly-CSharp - m_MethodName: PlayerValidateNameAndServerRoom + m_MethodName: OnClickSubmitSignIn m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -3264,8 +3311,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 27a435387a7644784a6fc6ae538b68e5, type: 3} m_Name: m_EditorClassIdentifier: - isRoomExist: 1 - isPlayerExist: 1 explanationTime: 4 roomCodeField: {fileID: 2023851070} roomError: {fileID: 991600093} @@ -6598,3 +6643,4 @@ SceneRoots: - {fileID: 429358650} - {fileID: 1202782730} - {fileID: 865098996} + - {fileID: 157909815} diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 5f912ce..156e872 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -67,7 +67,7 @@ private void Start() { currentExplanationTime = explanationTime; HomeConnection.SetActive(true); - submitNewPlayer.GetComponent().interactable = false; + submitNewPlayer.interactable = false; } public GameState GetCurrentState() @@ -81,7 +81,7 @@ private void Initialize() realtimeDB = FirebaseDatabase.DefaultInstance.RootReference; Debug.Log("Realtime DB initialized"); - submitNewPlayer.GetComponent().interactable = true; + submitNewPlayer.interactable = true; } ///