Compare commits

...

7 Commits

Author SHA1 Message Date
Savya Bikram Shah
a15b08df0c Fix 2026-06-07 18:28:00 +05:45
Savya Bikram Shah
8c6962762c Minor ux fix 2026-06-07 17:35:10 +05:45
Savya Bikram Shah
fd3c13e470 Merge remote-tracking branch 'origin/work_branch' into savya 2026-06-07 17:23:07 +05:45
Savya Bikram Shah
7d85a0be1d rewareded ux fix 2026-06-07 17:22:43 +05:45
Savya Bikram Shah
36cf9cdad1 Merge remote-tracking branch 'origin/work_branch' into savya
# Conflicts:
#	ProjectSettings/ProjectSettings.asset
2026-06-07 16:59:51 +05:45
Savya Bikram Shah
176d95ec6a Heat fix by fps cap 2026-06-07 16:58:17 +05:45
Savya Bikram Shah
f63c0c9d5e shapes more visible 2026-06-07 16:22:03 +05:45
22 changed files with 278 additions and 2452 deletions

View File

@@ -30,6 +30,9 @@ namespace Darkmatter.Features.AppBoot.Flow
public async UniTask StartAsync(CancellationToken cancellation = default)
{
#if UNITY_ANDROID || UNITY_IOS
Application.targetFrameRate = 60;
#endif
Screen.sleepTimeout = SleepTimeout.NeverSleep;
await _progression.LoadAsync();

View File

@@ -83,7 +83,10 @@ namespace Darkmatter.Features.SaveGate.Systems
_overlay.OnWatch -= OnWatch;
_overlay.OnCancel -= OnCancel;
reg.Dispose();
_overlay.HidePrompt();
// On Watch, keep the prompt up with both buttons locked while the ad loads;
// TryShowRewardedAsync hides it once the ad is ready or fails. Cancel/cancellation hide now.
if (result && !canceled) _overlay.SetPromptButtonsInteractable(false);
else _overlay.HidePrompt();
if (canceled) tcs.TrySetCanceled(ct);
else tcs.TrySetResult(result);
}
@@ -105,16 +108,18 @@ namespace Darkmatter.Features.SaveGate.Systems
try
{
if (!_ads.IsInitialized) await _ads.InitializeAsync(ct);
if (!_ads.IsReady(AdFormat.Rewarded) && !await _ads.LoadAsync(AdFormat.Rewarded, ct))
return _config.SaveWithoutAdOnFailure;
var ready = _ads.IsReady(AdFormat.Rewarded) || await _ads.LoadAsync(AdFormat.Rewarded, ct);
_overlay.HidePrompt(); // ad loaded or failed to load — now hide the prompt
if (!ready) return _config.SaveWithoutAdOnFailure;
var result = await _ads.ShowAsync(AdFormat.Rewarded, ct);
if (result.Rewarded) return true;
return result.Shown ? false : _config.SaveWithoutAdOnFailure;
}
catch (OperationCanceledException) { throw; }
catch (OperationCanceledException) { _overlay.HidePrompt(); throw; }
catch (Exception ex)
{
_overlay.HidePrompt();
UnityEngine.Debug.LogWarning($"[SaveGate] Rewarded ad gate failed: {ex.Message}");
return _config.SaveWithoutAdOnFailure;
}

View File

@@ -50,9 +50,18 @@ namespace Darkmatter.Features.SaveGate.UI
public void ShowPrompt()
{
if (successPanel != null) successPanel.SetActive(false);
SetPromptButtonsInteractable(true);
if (promptPanel != null) promptPanel.SetActive(true);
}
// Keep the prompt visible but lock both buttons — used while the rewarded ad loads
// after the child taps Watch, so the UI doesn't disappear during the wait.
public void SetPromptButtonsInteractable(bool interactable)
{
if (watchButton != null) watchButton.interactable = interactable;
if (cancelButton != null) cancelButton.interactable = interactable;
}
public void HidePrompt()
{
if (promptPanel != null) promptPanel.SetActive(false);

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 2486631034057256172}
- component: {fileID: 1825175764228994942}
- component: {fileID: 5150407165710724744}
- component: {fileID: 2917059898789904080}
m_Layer: 5
m_Name: Circle
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: a3dc108a48b1e4f2196e8d49ae8e3edd, type: 2}
outline: {fileID: 0}
--- !u!114 &2917059898789904080
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388206011285020732}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 8323421069085763461}
- component: {fileID: 9117445751559814248}
- component: {fileID: 3901214023037864946}
- component: {fileID: 6090018107368612813}
m_Layer: 5
m_Name: Oval
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: acfdb9428bcd74a85bade833220add1c, type: 2}
outline: {fileID: 0}
--- !u!114 &6090018107368612813
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8177199881523649195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 6365559784855574788}
- component: {fileID: 5619168769716611897}
- component: {fileID: 1426813748225321167}
- component: {fileID: 6467289076550783380}
m_Layer: 5
m_Name: Semi Circle
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: f5c929a6f977347d0ad820f3c75fad22, type: 2}
outline: {fileID: 0}
--- !u!114 &6467289076550783380
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4018315547665848156}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 8696052209776578822}
- component: {fileID: 2246199958633846422}
- component: {fileID: 2943043780804435268}
- component: {fileID: 7581479602513178600}
m_Layer: 5
m_Name: Semi Oval
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: 5cf3e58088f124445b00423cf68c01aa, type: 2}
outline: {fileID: 0}
--- !u!114 &7581479602513178600
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3131919094368649507}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 1022797824599580644}
- component: {fileID: 7793443009330116033}
- component: {fileID: 2829602331308694695}
- component: {fileID: 3752684219975244194}
m_Layer: 5
m_Name: Square
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: 0caa62d6f271c4acb8a09a75ebcc708b, type: 2}
outline: {fileID: 0}
--- !u!114 &3752684219975244194
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3388453239853753565}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -12,6 +12,7 @@ GameObject:
- component: {fileID: 7065549689243831870}
- component: {fileID: 3308324307825193136}
- component: {fileID: 879632870433278761}
- component: {fileID: 1501522852963495116}
m_Layer: 5
m_Name: Triangle
m_TagString: Untagged
@@ -90,3 +91,18 @@ MonoBehaviour:
m_EditorClassIdentifier: Features.ShapeBuilder::Darkmatter.Features.ShapeBuilder.UI.SlotMarker
shape: {fileID: 11400000, guid: 888b6a7cd3cae42099e8793f2e486dfd, type: 2}
outline: {fileID: 0}
--- !u!114 &1501522852963495116
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3053322834512969673}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
m_EffectColor: {r: 0.15686275, g: 0.14901961, b: 0.14901961, a: 1}
m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1

View File

@@ -187,7 +187,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: f6db270b00fab4f4b9c4f2002451b690, type: 3}
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
@@ -829,7 +829,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: f6db270b00fab4f4b9c4f2002451b690, type: 3}
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2,12 +2,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
<activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:label="@string/app_name" android:theme="@style/BaseUnityGameActivityTheme" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="android.app.lib_name" android:value="game" />
</activity>
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">b1198bcb-9e68-42ca-afdc-de38c0753861</string></resources>
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">0a4c6c8f-8290-4f0a-8af5-899267e3f184</string></resources>

View File

@@ -0,0 +1,82 @@
/*
* This file is generated by the FirebaseMessagingActivityGenerator script.
* Refer to that script for more information.
*/
package com.google.firebase;
import android.content.Intent;
import android.os.Bundle;
import com.google.firebase.messaging.MessageForwardingService;
import com.unity3d.player.UnityPlayerGameActivity;
/**
* MessagingUnityPlayerActivity is a UnityPlayerGameActivity that updates its intent when new intents
* are sent to it.
*
* This is a workaround for a known issue that prevents Firebase Cloud Messaging from responding to
* data payloads when both a data and notification payload are sent to the app while it is in the
* background.
*/
public class MessagingUnityPlayerActivity extends UnityPlayerGameActivity {
// The key in the intent's extras that maps to the incoming message's message ID. Only sent by
// the server, GmsCore sends EXTRA_MESSAGE_ID_KEY below. Server can't send that as it would get
// stripped by the client.
private static final String EXTRA_MESSAGE_ID_KEY_SERVER = "message_id";
// An alternate key value in the intent's extras that also maps to the incoming message's message
// ID. Used by upstream, and set by GmsCore.
private static final String EXTRA_MESSAGE_ID_KEY = "google.message_id";
// The key in the intent's extras that maps to the incoming message's sender value.
private static final String EXTRA_FROM = "google.message_id";
/**
* Workaround for when a message is sent containing both a Data and Notification payload.
*
* <p>When the app is in the background, if a message with both a data and notification payload is
* received the data payload is stored on the Intent passed to onNewIntent. By default, that
* intent does not get set as the Intent that started the app, so when the app comes back online
* it doesn't see a new FCM message to respond to. As a workaround, we override onNewIntent so
* that it sends the intent to the MessageForwardingService which forwards the message to the
* FirebaseMessagingService which in turn sends the message to the application.
*/
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// If we do not have a 'from' field this intent was not a message and should not be handled. It
// probably means this intent was fired by tapping on the app icon.
Bundle extras = intent.getExtras();
if (extras == null) {
return;
}
String from = extras.getString(EXTRA_FROM);
String messageId = extras.getString(EXTRA_MESSAGE_ID_KEY);
if (messageId == null) {
messageId = extras.getString(EXTRA_MESSAGE_ID_KEY_SERVER);
}
if (from != null && messageId != null) {
Intent message = new Intent(this, MessageForwardingService.class);
message.setAction(MessageForwardingService.ACTION_REMOTE_INTENT);
message.putExtras(intent);
message.setData(intent.getData());
MessageForwardingService.enqueueWork(this, message);
}
setIntent(intent);
}
/**
* Dispose of the mUnityPlayer when restarting the app.
*
* <p>This ensures that when the app starts up again it does not start with stale data.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (mUnityPlayer != null) {
mUnityPlayer.destroy();
mUnityPlayer = null;
}
super.onCreate(savedInstanceState);
}
}

View File

@@ -0,0 +1,28 @@
fileFormatVersion: 2
guid: e79bd7233f70e4addb0fced7e984ef06
labels:
- FirebaseMessagingActivityGenerated
PluginImporter:
externalObjects: {}
serializedVersion: 3
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
Android:
enabled: 1
settings: {}
Any:
enabled: 0
settings: {}
Editor:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -49,7 +49,7 @@ MonoBehaviour:
m_ExportAsGoogleAndroidProject: 0
m_DebugSymbolLevel: 4
m_DebugSymbolFormat: 5
m_CurrentDeploymentTargetId: __builtin__target_default
m_CurrentDeploymentTargetId: KBUKQ4PNCAOBS8YH
m_BuildType: 2
m_LinkTimeOptimization: 0
m_BuildAppBundle: 1

View File

@@ -15,7 +15,7 @@ EditorBuildSettings:
path: Assets/Darkmatter/Scenes/Colorbook.unity
guid: 145ae55f6571bfe4fbadaefb863ba69d
- enabled: 1
path: Assets/Darkmatter/Scenes/GamePlay.unity
path: Assets/Darkmatter/Scenes/Gameplay.unity
guid: e5f73f24e812e4a98b4c17d533fd3d6d
m_configObjects:
com.unity.addressableassets: {fileID: 11400000, guid: 732f53b1f9e534015be7dcd28d7032bd, type: 2}

View File

@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: Darkmatter Game Production
productName: 'Colorbook : Draw and Learn'
productName: Kidsage Colorbook
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -143,7 +143,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0
bundleVersion: 1.2
bundleVersion: 1.7
preloadedAssets:
- {fileID: 11400000, guid: cc969dbecb228fa49b16da9273753a8f, type: 2}
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
@@ -175,7 +175,7 @@ PlayerSettings:
iPhone: 1
tvOS: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 2
AndroidBundleVersionCode: 6
AndroidMinSdkVersion: 25
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
@@ -259,7 +259,7 @@ PlayerSettings:
clonedFromGUID: c19f32bac17ee4170b3bf8a6a0333fb9
templatePackageId: com.unity.template.universal-2d@6.1.3
templateDefaultScene: Assets/Scenes/SampleScene.unity
useCustomMainManifest: 0
useCustomMainManifest: 1
useCustomLauncherManifest: 0
useCustomMainGradleTemplate: 1
useCustomLauncherGradleManifest: 0
@@ -795,6 +795,7 @@ PlayerSettings:
webEnableSubmoduleStrippingCompatibility: 0
scriptingDefineSymbols:
Android: SENTIS_ANALYTICS_ENABLED;APP_UI_EDITOR_ONLY
iPhone: SENTIS_ANALYTICS_ENABLED;APP_UI_EDITOR_ONLY
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend:
@@ -871,7 +872,13 @@ PlayerSettings:
XboxOneOverrideIdentityName:
XboxOneOverrideIdentityPublisher:
vrEditorSettings: {}
cloudServicesEnabled: {}
cloudServicesEnabled:
Build: 0
Game Performance: 0
Legacy Analytics: 0
Purchasing: 0
UDP: 0
Unity Ads: 0
luminIcon:
m_Name:
m_ModelFolderPath:
@@ -894,11 +901,11 @@ PlayerSettings:
activeInputHandler: 1
windowsGamepadBackendHint: 0
enableDirectStorage: 0
cloudProjectId: 1b162cfc-d068-48e8-828d-db606f2617cb
cloudProjectId: d7c58a07-f44b-41a8-b808-f140faab88b8
framebufferDepthMemorylessMode: 0
qualitySettingsNames: []
projectName: Colorbook
organizationId: voidbotz
projectName: 'Colorbook : Draw and Learn'
organizationId: darkmattergamedev
cloudEnabled: 0
legacyClampBlendShapeWeights: 0
hmiLoadingImage: {fileID: 0}