From 5537e78f960ae6f4ddc81287cb164d4f9fb79ce8 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 22 Oct 2021 14:33:36 +0900 Subject: [PATCH] =?UTF-8?q?=E5=BA=83=E5=91=8A=E8=AA=AD=E8=BE=BC=E5=A4=B1?= =?UTF-8?q?=E6=95=97=E5=88=87=E3=82=8A=E6=9B=BF=E3=81=88=E7=94=A8=E3=83=87?= =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=B0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/DebugOption/DebugOption.unity | 159 +++++++++++++++++- .../DebugOption/Scripts/DebugOptionManager.cs | 6 + popcorn/Assets/MyGame/Scripts/AdManager.cs | 3 + .../Assets/MyGame/Scripts/GetRewardDialog.cs | 2 +- 4 files changed, 164 insertions(+), 6 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity b/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity index bd483cfd..44d8ef3e 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity @@ -498,6 +498,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: + - {fileID: 1076049185} - {fileID: 1998240840} - {fileID: 1074704276} - {fileID: 1484413800} @@ -689,7 +690,7 @@ PrefabInstance: - target: {fileID: 2541661409141469742, guid: 32f8e8f0ced494daeb0f218e6be9d9db, type: 3} propertyPath: m_ConstraintCount - value: 4 + value: 2 objectReference: {fileID: 0} - target: {fileID: 2541661409648867663, guid: 32f8e8f0ced494daeb0f218e6be9d9db, type: 3} @@ -759,7 +760,7 @@ PrefabInstance: - target: {fileID: 6737172384967821841, guid: 485257dfeb2144672bcc21b704b6ca0f, type: 3} propertyPath: m_RootOrder - value: 3 + value: 4 objectReference: {fileID: 0} - target: {fileID: 6737172384967821841, guid: 485257dfeb2144672bcc21b704b6ca0f, type: 3} @@ -911,7 +912,7 @@ PrefabInstance: - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, type: 3} propertyPath: m_RootOrder - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, type: 3} @@ -1023,6 +1024,153 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1001 &1076049184 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 744739666} + m_Modifications: + - target: {fileID: 1907863346325523399, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_Name + value: AlwaysVideoFailToLoad + objectReference: {fileID: 0} + - target: {fileID: 1907863346325523399, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6855072136971505580, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_Text + value: "\u52D5\u753B\u8AAD\u8FBC\n\u5931\u6557\u30D5\u30E9\u30B0" + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_SizeDelta.x + value: 80 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_SizeDelta.y + value: 80 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bc0b42d29ba9f4568aa0b803c18574c5, type: 3} +--- !u!224 &1076049185 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + m_PrefabInstance: {fileID: 1076049184} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1076049186 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 8246534116929882156, guid: bc0b42d29ba9f4568aa0b803c18574c5, + type: 3} + m_PrefabInstance: {fileID: 1076049184} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &1344540255 PrefabInstance: m_ObjectHideFlags: 0 @@ -1330,7 +1478,7 @@ PrefabInstance: - target: {fileID: 6737172384967821841, guid: 485257dfeb2144672bcc21b704b6ca0f, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 6737172384967821841, guid: 485257dfeb2144672bcc21b704b6ca0f, type: 3} @@ -1849,6 +1997,7 @@ MonoBehaviour: refillLittleProductButton: {fileID: 153639484} bulkOrderResetButton: {fileID: 1344540256} shopLevelUpResetButton: {fileID: 1349073832} + alwaysVideoFailToLoadToggle: {fileID: 1076049186} fastGrowingToggle: {fileID: 1998240841} manyWalkerToggle: {fileID: 1074704277} coinCount: {fileID: 1484413801} @@ -1902,7 +2051,7 @@ PrefabInstance: - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, type: 3} propertyPath: m_RootOrder - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8789217124120630612, guid: bc0b42d29ba9f4568aa0b803c18574c5, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs index e01fca64..a5856f0a 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs @@ -18,6 +18,7 @@ public class DebugOptionManager : MonoBehaviour [SerializeField] private Button refillLittleProductButton; [SerializeField] private Button bulkOrderResetButton; [SerializeField] private Button shopLevelUpResetButton; + [SerializeField] private Toggle alwaysVideoFailToLoadToggle; [SerializeField] private Toggle fastGrowingToggle; [SerializeField] private Toggle manyWalkerToggle; [SerializeField] private InputField coinCount; @@ -134,6 +135,11 @@ public class DebugOptionManager : MonoBehaviour // new PlantLineData(PlantLineType.Bottom, CornFieldRank.Rank3) // }; + alwaysVideoFailToLoadToggle.isOn = UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", false); + alwaysVideoFailToLoadToggle.OnValueChangedAsObservable().Subscribe(x => + { + UsayaStorageManager.Save(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", x); + }).AddTo(this); fastGrowingToggle.isOn = UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugFastGrowing", false); fastGrowingToggle.OnValueChangedAsObservable().Subscribe(x => { diff --git a/popcorn/Assets/MyGame/Scripts/AdManager.cs b/popcorn/Assets/MyGame/Scripts/AdManager.cs index e08c04fa..20f1cc34 100644 --- a/popcorn/Assets/MyGame/Scripts/AdManager.cs +++ b/popcorn/Assets/MyGame/Scripts/AdManager.cs @@ -45,6 +45,9 @@ public sealed class AdManager : SingletonMonoBehaviour { public bool IsLoadedRewardVideo(){ +#if DEVELOPMENT_BUILD || UNITY_EDITOR + return !UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", false); +#endif return true; // #if UNITY_EDITOR // return true; diff --git a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs index 1ec137df..952bb45d 100644 --- a/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs +++ b/popcorn/Assets/MyGame/Scripts/GetRewardDialog.cs @@ -101,8 +101,8 @@ namespace MyGame.Scripts } else { - TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin); TransitionManager.Instance.LoadSceneAdditive(GameScenes.WatchMovieFailure); + TransitionManager.Instance.UnloadScene(GameScenes.WatchMovieCoin); } }).AddTo(this); }