From 113b82bd46f50c47a2ac92c4d00ac30667f12998 Mon Sep 17 00:00:00 2001 From: Savya Bikram Shah Date: Fri, 29 May 2026 20:58:40 +0545 Subject: [PATCH] fixes --- .../AddressableAssetSettings.asset | 2 +- .../System/ColorbookFlowController.cs | 18 +++++++++++++++--- Packages/manifest.json | 1 - Packages/packages-lock.json | 10 ---------- ProjectSettings/EditorBuildSettings.asset | 9 +++++++++ ProjectSettings/ProjectSettings.asset | 2 +- ProjectSettings/ScriptableBuildPipeline.json | 2 +- 7 files changed, 27 insertions(+), 17 deletions(-) diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset index 5e6847e..3177a25 100644 --- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -58,7 +58,7 @@ MonoBehaviour: m_ContentStateBuildPathProfileVariableName: m_CustomContentStateBuildPath: m_ContentStateBuildPath: - m_BuildAddressablesWithPlayerBuild: 0 + m_BuildAddressablesWithPlayerBuild: 1 m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]' m_GroupAssets: - {fileID: 11400000, guid: ec9d910e81be14a1484f351f20d32f6f, type: 2} diff --git a/Assets/Darkmatter/Code/Features/ColorbookFlow/System/ColorbookFlowController.cs b/Assets/Darkmatter/Code/Features/ColorbookFlow/System/ColorbookFlowController.cs index 0796969..b8bca9d 100644 --- a/Assets/Darkmatter/Code/Features/ColorbookFlow/System/ColorbookFlowController.cs +++ b/Assets/Darkmatter/Code/Features/ColorbookFlow/System/ColorbookFlowController.cs @@ -89,6 +89,7 @@ public class ColorbookFlowController : IAsyncStartable, IDisposable private void OnDrawingSelected(DrawingSelectedSignal signal) { + if (_navigatingToGameplay) return; _navigatingToGameplay = true; HandleSelectionAsync(signal.TemplateId).Forget(); } @@ -97,9 +98,11 @@ public class ColorbookFlowController : IAsyncStartable, IDisposable { var ct = _scopeCts?.Token ?? CancellationToken.None; + _loadingScreen.Show(); + _loadingScreen.SetProgress(0f); + await ShowRewardedAdAsync(ct); - _loadingScreen.Show(); var progress = new Progress(p => _loadingScreen.SetProgress(p * 0.5f)); var mappedProgress = new Progress(p => _loadingScreen.SetProgress(0.5f + p * 0.25f)); await _progression.SetLastOpenedAsync(templateId); @@ -110,15 +113,24 @@ public class ColorbookFlowController : IAsyncStartable, IDisposable private async UniTask ShowRewardedAdAsync(CancellationToken ct) { + const int InitTimeoutMs = 4000; try { - if (!_ads.IsInitialized) await _ads.InitializeAsync(ct); + if (!_ads.IsInitialized) + { + using var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(ct); + timeoutCts.CancelAfter(InitTimeoutMs); + await _ads.InitializeAsync(timeoutCts.Token); + } + + if (!_ads.IsReady(AdFormat.Rewarded)) return; + await _ads.ShowAsync(AdFormat.Rewarded, ct); } catch (OperationCanceledException) { } catch (Exception ex) { - UnityEngine.Debug.LogWarning($"[ColorbookFlow] Rewarded ad failed: {ex.Message}"); + UnityEngine.Debug.LogWarning($"[ColorbookFlow] Rewarded ad skipped: {ex.Message}"); } } diff --git a/Packages/manifest.json b/Packages/manifest.json index 28ed9db..ebc8a6b 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -15,7 +15,6 @@ "com.unity.2d.tilemap.extras": "7.0.1", "com.unity.2d.tooling": "2.0.1", "com.unity.addressables": "2.9.1", - "com.unity.addressables.android": "1.0.10", "com.unity.collab-proxy": "2.12.4", "com.unity.ide.rider": "3.0.39", "com.unity.ide.visualstudio": "2.0.27", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 4388d8f..0bbcdf8 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -170,16 +170,6 @@ }, "url": "https://packages.unity.com" }, - "com.unity.addressables.android": { - "version": "1.0.10", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.addressables": "2.3.16", - "com.unity.modules.androidjni": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.burst": { "version": "1.8.29", "depth": 2, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index a74608d..786e478 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -8,6 +8,15 @@ EditorBuildSettings: - enabled: 1 path: Assets/Darkmatter/Scenes/Boot.unity guid: 8c9cfa26abfee488c85f1582747f6a02 + - enabled: 1 + path: Assets/Darkmatter/Scenes/MainMenu.unity + guid: 10aca8a0883a60447b95ad82d2cf3a98 + - enabled: 1 + path: Assets/Darkmatter/Scenes/Colorbook.unity + guid: 145ae55f6571bfe4fbadaefb863ba69d + - enabled: 1 + path: Assets/Darkmatter/Scenes/GamePlay.unity + guid: e5f73f24e812e4a98b4c17d533fd3d6d m_configObjects: com.unity.addressableassets: {fileID: 11400000, guid: 732f53b1f9e534015be7dcd28d7032bd, type: 2} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 0873828..7effba6 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -18,7 +18,7 @@ PlayerSettings: cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_ShowUnitySplashScreen: 1 - m_ShowUnitySplashLogo: 1 + m_ShowUnitySplashLogo: 0 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 m_SplashScreenLogoStyle: 1 diff --git a/ProjectSettings/ScriptableBuildPipeline.json b/ProjectSettings/ScriptableBuildPipeline.json index 551b978..dfa4f08 100644 --- a/ProjectSettings/ScriptableBuildPipeline.json +++ b/ProjectSettings/ScriptableBuildPipeline.json @@ -5,7 +5,7 @@ "threadedArchiving": true, "logCacheMiss": false, "logAssetWarnings": true, - "slimWriteResults": false, + "slimWriteResults": true, "maximumCacheSize": 20, "useDetailedBuildLog": false, "useV2Hasher": true,