From 3335373be4f3e9a598d6c41314028e7ef72a3645 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 1 Jul 2022 10:40:40 +0900 Subject: [PATCH] fix DebugGame.cs --- .../MyGame/Scenes/MiniGame/Scripts/DebugGame.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/DebugGame.cs b/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/DebugGame.cs index 040e53b8..40310fd1 100644 --- a/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/DebugGame.cs +++ b/popcorn/Assets/MyGame/Scenes/MiniGame/Scripts/DebugGame.cs @@ -19,13 +19,19 @@ namespace MyGame.Scenes.MiniGame.Scripts [SerializeField] private Button resetPlayCountButton; [SerializeField] private Button allHiScoreButton; - private void Start() +#if UNITY_EDITOR || DEVELOPMENT_BUILD +#else + private void Awake() { -#if !UNITY_EDITOR Destroy(resetScoreButton); Destroy(resetPlayCountButton); Destroy(allHiScoreButton); -#else + } +#endif + +#if UNITY_EDITOR || DEVELOPMENT_BUILD + private void Start() + { isDebug.AddTo(this); resetScoreButton.OnClickAsObservable().Subscribe(_ =>