This commit is contained in:
Savya Bikram Shah
2026-05-29 20:58:40 +05:45
parent 3e5ff544bf
commit 113b82bd46
7 changed files with 27 additions and 17 deletions

View File

@@ -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}

View File

@@ -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<float>(p => _loadingScreen.SetProgress(p * 0.5f));
var mappedProgress = new Progress<float>(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}");
}
}

View File

@@ -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",

View File

@@ -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,

View File

@@ -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}

View File

@@ -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

View File

@@ -5,7 +5,7 @@
"threadedArchiving": true,
"logCacheMiss": false,
"logAssetWarnings": true,
"slimWriteResults": false,
"slimWriteResults": true,
"maximumCacheSize": 20,
"useDetailedBuildLog": false,
"useV2Hasher": true,