From 0d3ac9a0bab94edc745a755e1ac528d8b8464369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Tue, 26 Mar 2024 21:34:57 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=8B=9C=EC=9E=91=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/1_Script/Prefab/StoryPrefab.cs | 12 ++++++++++++ Client/Assets/3_Prefab/StoryPrefab.prefab | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Client/Assets/1_Script/Prefab/StoryPrefab.cs b/Client/Assets/1_Script/Prefab/StoryPrefab.cs index ac4fccea..22dca6f8 100644 --- a/Client/Assets/1_Script/Prefab/StoryPrefab.cs +++ b/Client/Assets/1_Script/Prefab/StoryPrefab.cs @@ -1,9 +1,21 @@ using TMPro; using UnityEngine; +using UnityEngine.UI; public class StoryPrefab : MonoBehaviour { [SerializeField] TMP_Text storyText; + [SerializeField] Button button; + + private void Awake() + { + //Àӽà ÀÛ¾÷ Set¿¡¼­ Á¤º¸¸¦ ó¸®ÇÏ°Ô ¸¸µé±â + Set(); + } + public void Set() + { + button.onClick.AddListener(GameCtrl.Instance.StartPlay); + } public void StoryButton() { Debug.Log(storyText.text); diff --git a/Client/Assets/3_Prefab/StoryPrefab.prefab b/Client/Assets/3_Prefab/StoryPrefab.prefab index 1367e6da..d58735d6 100644 --- a/Client/Assets/3_Prefab/StoryPrefab.prefab +++ b/Client/Assets/3_Prefab/StoryPrefab.prefab @@ -27,7 +27,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1076649358208843570} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -148,6 +148,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: storyText: {fileID: 6122948490513045963} + button: {fileID: 7407443869202666565} --- !u!1 &5511528505370174996 GameObject: m_ObjectHideFlags: 0