com.duolabz.monetization 0.0.0-stage → 2.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -0,0 +1,29 @@
1
+ fileFormatVersion: 2
2
+ guid: 5eec4d7e748f4a91bd3a9e3b749e06ac
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 0
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ '': Any
16
+ second:
17
+ enabled: 0
18
+ settings: {}
19
+ - first:
20
+ Editor: Editor
21
+ second:
22
+ enabled: 1
23
+ settings:
24
+ CPU: AnyCPU
25
+ DefaultValueInitialized: true
26
+ OS: AnyOS
27
+ userData:
28
+ assetBundleName:
29
+ assetBundleVariant:
@@ -0,0 +1,30 @@
1
+ fileFormatVersion: 2
2
+ guid: 24e1a2f99bfb469ab96c99c9ad4e327e
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints:
9
+ - DUO_BINARY_SDKS_READY
10
+ isPreloaded: 0
11
+ isOverridable: 0
12
+ isExplicitlyReferenced: 0
13
+ validateReferences: 1
14
+ platformData:
15
+ - first:
16
+ '': Any
17
+ second:
18
+ enabled: 0
19
+ settings: {}
20
+ - first:
21
+ Editor: Editor
22
+ second:
23
+ enabled: 1
24
+ settings:
25
+ CPU: AnyCPU
26
+ DefaultValueInitialized: true
27
+ OS: AnyOS
28
+ userData:
29
+ assetBundleName:
30
+ assetBundleVariant:
package/Editor.meta ADDED
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 72a14b77cb3455b18fc703812daf413b
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/LICENSE.md ADDED
@@ -0,0 +1 @@
1
+ Copyright DuoLabz. All rights reserved. Proprietary software for authorized DuoLabz use only. No redistribution or sublicensing is permitted.
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: ecd704d5e36852b695d5a6f2d7d7c393
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,44 @@
1
+ {
2
+ "scripts": [
3
+ {
4
+ "guid": "ce064afc2c3de4e41b77fc5a4407dc8e",
5
+ "type": "AdTelemetryManager"
6
+ },
7
+ {
8
+ "guid": "0c568252b52614c9ab457021f9d99b3d",
9
+ "type": "AdmobManager"
10
+ },
11
+ {
12
+ "guid": "c1070f84943544f5d814e049709160dc",
13
+ "type": "FirebaseManager"
14
+ },
15
+ {
16
+ "guid": "8828acf82c7bd493983dc8709a725808",
17
+ "type": "MainThreadDispatcher"
18
+ },
19
+ {
20
+ "guid": "a351b04b8496d4f48b80e1a33e9af803",
21
+ "type": "DuoLabz.Monetization.DuoMonetizationSettings"
22
+ },
23
+ {
24
+ "guid": "c0ec5960d7184191833bebc419da68e6",
25
+ "type": "DuoLabz.Monetization.DuoGameSettingsClient"
26
+ },
27
+ {
28
+ "guid": "7f3b3b9c0dbd4457b1de11eb54787556",
29
+ "type": "DuoLabz.Monetization.DuoIntegrationBuildInfo"
30
+ },
31
+ {
32
+ "guid": "1696f1da604c461c8e7008f6893cbd03",
33
+ "type": "DuoLabz.Monetization.DuoIntegrationReporter"
34
+ },
35
+ {
36
+ "guid": "b992ab6af2a6e4e129de578e71c1efbb",
37
+ "type": "DuoLabz.Monetization.DuoMonetizationBootstrap"
38
+ },
39
+ {
40
+ "guid": "c1bc79970a5e4f43b49c2706d5b20b32",
41
+ "type": "DuoLabz.Monetization.DuoProgressionManager"
42
+ }
43
+ ]
44
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: dc65fe1fe6755cc8ae3d1b4de3575b31
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/Migration.meta ADDED
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: feccd3bde9285c00b1b6eb72aa95d4d0
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/README.md CHANGED
@@ -1,3 +1,163 @@
1
- # Temporary Holding Version
1
+ # Duo Monetization — binary package
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Binary **2.8.3** supports **Unity 2022.3 LTS and later**. Connect to DuoPulse can sync the saved Android or iOS GameAnalytics keys for the selected platform. Android and iOS device acceptance for this release is pending.
4
+
5
+ ## SDK installation and cleanup
6
+
7
+ Open **Tools > DuoLabz > Monetization > Manage SDKs** (also available through **SDK Installation** in the Setup Assistant). Review installed, recommended and tested/untested status. **Preview SDK installation** shows every install/replacement before confirmation. Optional GameAnalytics is off by default; its archive opens Unity's import preview. Existing Firebase configuration files, AdMob app IDs and Duo settings are preserved.
8
+
9
+ The installer configures the narrow AdMob OpenUPM registry when needed, downloads versioned Google/GameAnalytics archives from official HTTPS sources and verifies SHA-256 hashes before installation. Downloads finish before the package manifest changes. The manifest and existing lock file are backed up under `Library/DuoSdkSetup/backups`; setup resumes after recompilation. The window offers a guarded manifest restore, and never automatically deletes legacy SDKs from Assets. Migrate duplicate SDK copies manually first.
10
+
11
+ Temporary `.part` files and imported/cancelled GameAnalytics `.unitypackage` downloads are removed automatically. **Referenced Firebase/Dependency Manager `.tgz` files are not disposable installers:** they stay in `Packages/DuoSdkArchives`. Commit that folder with `Packages/manifest.json` and `Packages/packages-lock.json` so teammates can resolve the same dependencies. **Clean unused setup files** removes only unchanged archives downloaded by Duo that no manifest, lock file or rollback backup references. Backups and user-owned files are preserved.
12
+
13
+ Minimum stable versions are AdMob **11.4.0**, Firebase **13.16.0**, and Google EDM4U **1.2.186** or Unity EDM **2.1.0**. The installer accepts later stable versions and flags releases that have yet to be tested with Duo. All installed Firebase products must use the same release. If Unity EDM is active, Duo recognizes it and ignores the empty Google EDM4U package that Unity can create. Optional GameAnalytics is validated with **8.3.0**.
14
+
15
+ ## Installation
16
+
17
+ 1. Install Git; Git LFS is not required. The binary repository is public, so GitHub authentication and collaborator invitations are not required for installation. The software remains proprietary under the included license; public download does not grant unrestricted redistribution rights.
18
+ 2. In Package Manager choose Add package from git URL and use `https://github.com/JunaidUmar/DuoFrameworkBinary.git#<tag>`, replacing `<tag>` with the tag of the release you want to install. If you have the release ZIP, extract it and choose Add package from disk to select its `package.json`. [Binary releases](https://github.com/JunaidUmar/DuoFrameworkBinary/releases)
19
+
20
+ 3. Set the project package name or bundle ID and select **Tools → DuoLabz → Monetization → Connect to DuoPulse**. If required SDKs are missing, the installer opens. Preview and approve the selection. Unity continues to browser approval after it compiles the SDKs. Use **Manage SDKs** to install dependencies separately. Install the dependencies before importing the usage sample or compiling gameplay scripts that call the framework.
21
+ 4. Run Create or Repair Setup. This creates the settings asset, bootstrap prefab and `Assets/DuoMonetization/link.xml`. Keep the preservation file in the game; Unity does not support placing that file only inside a package.
22
+ 5. If setting up manually, configure the game's Firebase client files, AdMob app ID, fallback ad unit IDs and telemetry settings. Keep production credentials out of shared repositories and samples.
23
+ 6. Use one bootstrap in the game's first scene. Use `DuoMonetization` and `DuoAnalytics` in gameplay. See the Basic Integration sample.
24
+
25
+ Official guides: [Google Mobile Ads](https://developers.google.com/admob/unity/quick-start), [Firebase Unity](https://firebase.google.com/docs/unity/setup).
26
+
27
+ ## Interstitial loading screen
28
+
29
+ On the `DuoMonetizationBootstrap` component, **Show Interstitial Loading Screen** is checked by default. Uncheck it to show interstitials immediately. The built-in panel displays **Ad is loading** for **3 seconds**. Edit the text and duration in the Inspector.
30
+
31
+ To use your own screen, assign an optional **Custom Interstitial Loading Panel**. Keep the panel under the bootstrap so it survives scene changes. Keep calling `DuoMonetization.ShowInterstitial(completed)` at the usual gameplay transitions. When no interstitial is ready, the completion callback runs immediately.
32
+
33
+ ## App-open ads on the startup splash
34
+
35
+ Call `DuoMonetization.ShowAppOpen()` while the splash screen is visible. Use `Time.unscaledDeltaTime` for the loading animation so it can advance while the Unity Editor test ad pauses game time. When loading finishes, cancel any pending startup ad and keep the splash visible until an ad already on screen closes.
36
+
37
+ ```csharp
38
+ DuoMonetization.HideAppOpen();
39
+ while (FullScreenAdCoordinator.ActiveAdKind == FullScreenAdKind.AppOpen)
40
+ {
41
+ yield return null;
42
+ }
43
+ // Activate the next scene here.
44
+ ```
45
+
46
+ ## Setup sync
47
+
48
+ Set the Android package name or iOS bundle ID under Unity Player Settings. Select **Connect to DuoPulse** in the Tools menu or Setup Assistant. Use **Production** for live apps or **Staging** for test apps. Sign in, check the app and short approval check displayed in Unity, and approve in the browser. Unity fills in the Game ID and any available AdMob app ID, Firebase client file and fallback ad units. Review any replacements in Unity before applying. A valid telemetry key already in Unity is preserved. On a fresh project, a studio manager or super admin can enable key access for assigned developers in DuoPulse under **Application overview → Telemetry access**.
49
+
50
+ ## Optional progression and funnels
51
+
52
+ Enable **Progression Enabled** in Duo settings and select its server/Firebase/GameAnalytics destinations. It is disabled by default, preserving existing games. The existing standard telemetry endpoint resolves `/api/v1/progression/events`; use the same per-application credential.
53
+
54
+ For GameAnalytics, install the optional [official SDK](https://docs.gameanalytics.com/event-tracking-and-integrations/sdks-and-collection-api/game-engine-sdks/unity/) from **Manage SDKs**. With **8.3.0** installed, **Connect to DuoPulse** copies the saved Game Key and Secret Key for the selected platform into GameAnalytics settings when the server supports key sync. Run the sync for each platform you ship. You can also enter the keys in GameAnalytics settings. Remove other initialization and duplicate progression calls. Duo initializes GameAnalytics once collection is allowed. Run **Create or Repair Setup** after upgrading to generate the game's updated preservation file for IL2CPP.
55
+
56
+ ```csharp
57
+ using DuoLabz.Monetization;
58
+
59
+ // Apply the game's analytics privacy decision after bootstrap initialization.
60
+ DuoProgression.SetCollectionAllowed(analyticsAllowed);
61
+ DuoProgression.Start("level_001");
62
+ DuoProgression.Complete("level_001", score: 0);
63
+
64
+ DuoProgression.Start("Classic", "World_2", "Level_5");
65
+ DuoProgression.Fail("Classic", "World_2", "Level_5", reason: "time_limit");
66
+ ```
67
+
68
+ Use exactly the same path for an attempt's start/outcome. Call on the Unity main thread. Names are stable strings (1–64 characters per part, no colons/control characters), not random IDs. Repeated Start on an active path is ignored; retries begin after an outcome. Outcomes without Start are ignored with a warning. Quitting/backgrounding is not failure. Duration measures elapsed time including background time.
69
+
70
+ Each newly recorded progression event writes a Unity Console/Android Logcat line, including in non-development builds: `[Duo Progression] Recorded locally | start | level_001 | environment=development`. Filter for `[Duo Progression]` to check call timing. This confirms local queue acceptance, not Firebase/GameAnalytics/server receipt. Duplicate Starts and events blocked by collection permission do not log as recorded. Player identifiers, credentials and free-text failure details are not logged; keep level names free of personal data.
71
+
72
+ Progression Requires Consent defaults on: no collection/replay before `SetCollectionAllowed(true)`. This is separate from ad consent and does not control Firebase automatic events or code outside Duo. Configure the game's privacy disclosures and applicable SDK controls. Automatic development/staging progression goes only to Duo unless the corresponding vendor QA option is explicitly enabled **with separate QA projects/games**.
73
+
74
+ The app/environment-specific random Duo reference persists across sessions; clearing app data/reinstall may reset it, subject to OS backups. No device registration or advertising identifier is used for Duo. `SetCollectionAllowed(false)` clears unsent progression. `ResetLocalIdentity()` does not delete historical data. `RequestServerDataDeletion(callback)` requests Duo erasure, stops collection, and rotates the reference on success; retry failures before resetting it. Vendor history requires vendor-specific deletion.
75
+
76
+ Open the application's **Progression overview** or **Player funnels** in Console. Choices appear only after matching events are received. Optional empty hierarchy parts mean no further part, not any descendant. Reports support ordered/unordered steps after entry, completion windows, revisions, environments and CSV export. Dates select each installation's first matching entry, not all later outcomes. Pending is not confirmed churn. Reports may differ from vendor charts due to session/identity, timing and counting definitions. Server retries are deduplicated; vendor SDK delivery across crashes is not guaranteed exactly once.
77
+
78
+ Validate each target platform, consent allow/deny, flat/nested paths, retries, offline/restart delivery, QA separation, SDK dashboards and known funnel journeys before rolling out to production games.
79
+
80
+ ## Upgrade from the source package
81
+
82
+ Commit your game first. Do not install source and binary implementations simultaneously.
83
+
84
+ 1. Save scenes and assets, then replace the existing `com.duolabz.monetization` Git dependency with the binary Git URL. Remove any copied legacy framework scripts; duplicate types are not supported.
85
+ 2. Ensure the validated SDKs are installed and let Unity compile.
86
+ 3. Run Tools > DuoLabz > Monetization > Migrate Source Package References to DLLs. This explicitly confirms changes, remaps known source-package script references in text-serialized scenes/prefabs/settings and backs up originals under `Library/DuoBinaryMigration`. It does not migrate custom copies with different GUIDs, binary-serialized assets, or Addressables bundles. Contact the framework maintainer for those cases.
87
+ 4. Reopen affected scenes, run Create or Repair Setup, verify there are no missing scripts and review all settings. Rebuild any previously built bundles.
88
+ 5. Test Android and iOS before shipping. Revert the game commit and restore the v1.3.1 Git URL if rollback is needed. Do not remove the old release during the transition.
89
+
90
+ ## Supported behavior and release checks
91
+
92
+ Public gameplay calls, priority/fallback handling, UMP-owned consent and telemetry environments are retained. Use the normal Google UMP configuration for consent.
93
+
94
+ Use development/test-ad builds for QA. Check consent allow/deny, all ad formats, rewarded callbacks, app-open suppression, platform-specific IDs, Remote Config/cache/Inspector fallback, analytics, recorded revenue and telemetry uploads. Check both development and release IL2CPP builds. This package contains no Firebase or AdMob SDK binaries or their native installers; install those official dependencies separately.
95
+
96
+ ## Updating
97
+
98
+ Change the Git URL tag to an approved newer version in Package Manager or `Packages/manifest.json`. Release tags are immutable. SDK compatibility is listed for each release; do not silently upgrade third-party SDKs beyond the validated version set.
99
+
100
+ Crashlytics is available as an optional SDK in Manage SDKs and matches the installed Firebase release. New settings prefill the Duo telemetry URL; Create or Repair Setup fills a blank URL while preserving custom URLs. Progression derives its route from telemetry; existing custom overrides are preserved and hidden from normal editing. Verify Crashlytics reporting with a device test crash and platform symbol setup.
101
+
102
+ ## DuoPulse integration checklist
103
+
104
+ Keep **Integration Reporting Enabled** and **Telemetry Enabled** on in Duo settings. Development/staging reporting is automatic; production/release builds additionally require **Integration Reporting In Production** to be enabled explicitly. The standard configured telemetry URL resolves `/api/v1/integration/reports` on the same HTTPS host, supporting both Pulse and the legacy host. Custom nonstandard telemetry paths do not enable this feature. Editor play mode does not upload reports; make an Android/iOS build and run it on a device.
105
+
106
+ Build processing embeds a generated per-build UUID and non-secret setup results into the compiled scene's bootstrap. Original scenes, prefabs, Google files and credential settings are not rewritten. No requests are made on the build machine. When the game runs, it reports those embedded build facts and a separate runtime snapshot. The report timestamp is when the snapshot was produced for upload, not a claim about when an SDK was installed or when the build was compiled. Existing binaries cannot begin reporting without rebuilding.
107
+
108
+ Build checks cover Duo settings, installed Firebase/AdMob SDKs, optional GameAnalytics compatibility/keys, the platform Google services file and identifier match, and the AdMob app ID. Multiple matching Google config files fail the file check rather than choosing one silently. Runtime checks report observed Firebase initialization, fresh Remote Config fetch/activation, ad initialization/load, and GameAnalytics initialization when Duo owns it. Cached defaults do not count as a fresh server fetch. Collection states and vendor delivery are not inferred from SDK presence.
109
+
110
+ Firebase Analytics collection stays **unknown** unless your game explicitly reports the state it set after its privacy decision:
111
+
112
+ ```csharp
113
+ DuoLabz.Monetization.DuoIntegrationChecklist.ReportFirebaseAnalyticsCollection(analyticsEnabled);
114
+ ```
115
+
116
+ This method reports a state; it does not enable/disable Firebase, grant consent, or prove Firebase received events. Optional GameAnalytics remains not applicable when its destination is disabled, and waits for the existing progression privacy flow when enabled.
117
+
118
+ Leave **Integration Details Revision** at `-1` unless the developer knows the portal revision actually used. This is not the Firebase Remote Config revision. Matching revision numbers are client-reported evidence, not independent content verification.
119
+
120
+ The dashboard is application > **Integration checklist**. Select the correct platform/environment/build. Runtime snapshots are coalesced (at least 60 seconds between changes), with unchanged callbacks suppressed. The eight-entry persistent retry queue is scoped to endpoint, credential, environment and build using a hash; files contain reports, not credentials, player/device IDs, raw logs or Google file contents. Retries preserve report UUID/body, back off to 30 minutes, expire after seven days, reject redirects, and require a matching server acknowledgment before removal. Invalid reports are discarded; rejected credentials suspend uploads for the current run. Reporting failures do not stop gameplay. Disabling telemetry or checklist reporting stops checklist uploads. Device networking, native SDK behavior and Google file packaging still require a game/device test.
121
+
122
+
123
+ ### Banner layout API
124
+
125
+ Inspector settings select Adaptive/Standard banner size, Top/Bottom banner position and one of seven rectangle presets (Top, Bottom, Center, or any corner). Standard is 320×50 dp; Medium Rectangle remains 300×250 dp using the separate rectangle IDs. Existing no-argument calls keep using configured defaults (adaptive-bottom and rectangle-top for existing projects).
126
+
127
+ ```csharp
128
+ using DuoLabz.Monetization;
129
+ DuoMonetization.ConfigureBanner(BannerSize.Standard, BannerPosition.Bottom);
130
+ DuoMonetization.ConfigureMediumRectangle(RectanglePosition.Center);
131
+ DuoMonetization.ShowBanner();
132
+ DuoMonetization.ShowBanner(BannerPosition.Top, BannerSize.Adaptive);
133
+ DuoMonetization.ShowMediumRectangle(RectanglePosition.Center);
134
+ DuoMonetization.ShowMediumRectangle(RectanglePosition.BottomRight);
135
+ DuoMonetization.SetBannerPosition(BannerPosition.Bottom);
136
+ DuoMonetization.SetMediumRectanglePosition(RectanglePosition.Top);
137
+ DuoMonetization.HideBanner();
138
+ DuoMonetization.HideMediumRectangle();
139
+ ```
140
+
141
+ Configure calls may precede initialization; show/hide calls require the Duo instance. Call these APIs on Unity's main thread. Size changes reload while retaining visibility intent; position-only changes move existing views. `GetBannerSizeInPixels()` and `GetMediumRectangleSizeInPixels()` return actual loaded screen-pixel sizes, or zero before ready. Respect Canvas scaling when reserving UI space. Automatic-refresh flags must match AdMob's per-format settings. Physical Android/iOS validation remains pending.
142
+
143
+ ## DuoPulse Game Settings
144
+
145
+ Use DuoPulse 1.8.0 or later for Game Parameters and Framework Settings. In the application workspace, developers register stable keys with a type and default. Scoped studio managers edit draft values, preview and publish a version for Development, Staging or Production, or restore an earlier version as a new revision. Ad Unit Configuration has its own editor. Keep keys stable for installed builds and use a new key when a type changes.
146
+
147
+ In the Unity settings asset, enable **Use DuoPulse Game Settings**, copy the application ID from the Game Parameters page into **Duo Pulse Game Id**, and use the existing per-game telemetry URL and token. Choose **Game Settings Environment** or leave it on Automatic, which uses Development for Editor/development builds and Production for release builds. Settings retrieval uses the application token independently of telemetry collection.
148
+
149
+ At startup, Unity loads the last valid snapshot for this game and environment. Background refresh downloads a complete published version and stages it. Call `DuoConfig.ActivatePending()` on the main thread at a safe transition, such as opening the lobby or starting a new run. `DuoConfig.HasPendingChanges` indicates that a version is available. The first launch can use the fallbacks bundled in game code.
150
+
151
+ ```csharp
152
+ DuoConfig.ActivatePending();
153
+ int interval = DuoConfig.GetInt("special_level_counter", fallback: 5);
154
+ var order = DuoConfig.GetStringList("level_order", new[] { "level_01", "level_02" });
155
+ ```
156
+
157
+ Use `GetBool`, `GetInt`, `GetNumber`, `GetString`, `GetDateTime`, `GetStringList` or `GetIntList` for the matching type. Dates are UTC. Unknown keys and mismatched types use the caller's fallback. `DuoConfig.Revision` identifies the active version. Removing a published framework override lets the current local/Firebase interval take over again. Existing game code decides when to request an interstitial.
158
+
159
+ For an A/B test, the manager sets the regular parameter value for group A and a second value plus a percentage for group B, then publishes to the selected environment. Unity chooses the group using a random installation identifier stored locally. The existing typed getters return that group's value after activation. Older Game Settings builds use the regular value. Removing the test and publishing gives everyone the regular value again.
160
+
161
+ For funnel reporting, publish a named test and enable DuoPulse Game Settings and server progression reporting in the same environment. Apply the settings at your usual safe transition. The first regular progression start reports the active group using the existing progression identity. Existing progression events from that point are eligible for the group comparison. In Player Funnels, open your existing funnel and select the named test.
162
+
163
+ For the first test, publish `special_level_counter` as an integer and `level_order` as a string list in Development. Run a development build, activate the new version at the lobby, and verify both values. Check a disconnected restart and restore the preceding revision to verify the cache and rollback path.
package/README.md.meta ADDED
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 18ddf3ece3cf5accabdb6d79160dc053
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
Binary file
@@ -0,0 +1,30 @@
1
+ fileFormatVersion: 2
2
+ guid: 3f4fe97698f24c3aa328cf08f37b49bd
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints:
9
+ - DUO_BINARY_SDKS_READY
10
+ isPreloaded: 0
11
+ isOverridable: 0
12
+ isExplicitlyReferenced: 0
13
+ validateReferences: 1
14
+ platformData:
15
+ - first:
16
+ '': Any
17
+ second:
18
+ enabled: 1
19
+ settings: {}
20
+ - first:
21
+ Editor: Editor
22
+ second:
23
+ enabled: 1
24
+ settings:
25
+ CPU: AnyCPU
26
+ DefaultValueInitialized: true
27
+ OS: AnyOS
28
+ userData:
29
+ assetBundleName:
30
+ assetBundleVariant:
@@ -0,0 +1,10 @@
1
+ <linker>
2
+ <assembly fullname="GameAnalyticsSDK" ignoreIfMissing="1">
3
+ <type fullname="GameAnalyticsSDK.GameAnalytics" preserve="all" />
4
+ <type fullname="GameAnalyticsSDK.GAProgressionStatus" preserve="all" />
5
+ </assembly>
6
+ <assembly fullname="Assembly-CSharp" ignoreIfMissing="1">
7
+ <type fullname="GameAnalyticsSDK.GameAnalytics" preserve="all" />
8
+ <type fullname="GameAnalyticsSDK.GAProgressionStatus" preserve="all" />
9
+ </assembly>
10
+ </linker>
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 959d936d0988571897409daa378b0048
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/Runtime.meta ADDED
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: d42191559b48532b9238701e82f9bcba
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,92 @@
1
+ using DuoLabz.Monetization;
2
+ using UnityEngine;
3
+
4
+ public sealed class MonetizationGameplayExample : MonoBehaviour
5
+ {
6
+ private const string StoreModalReason = "store-purchase";
7
+
8
+ // Enable progression in Duo settings. Call this only after the game's analytics privacy decision.
9
+ public void ApplyAnalyticsPermission(bool allowed) => DuoProgression.SetCollectionAllowed(allowed);
10
+
11
+ public void OnLevelStarted(string stableLevelName) => DuoProgression.Start(stableLevelName);
12
+ public void OnLevelCompleted(string stableLevelName) => DuoProgression.Complete(stableLevelName);
13
+ public void OnLevelFailed(string stableLevelName) => DuoProgression.Fail(stableLevelName, reason: "gameplay_failure");
14
+
15
+ private void OnEnable()
16
+ {
17
+ DuoMonetization.StateChanged += HandleMonetizationStateChanged;
18
+ }
19
+
20
+ private void OnDisable()
21
+ {
22
+ DuoMonetization.StateChanged -= HandleMonetizationStateChanged;
23
+ }
24
+
25
+ public void OnMenuOpened()
26
+ {
27
+ DuoMonetization.ShowBanner();
28
+ DuoAnalytics.LogEvent("menu_opened");
29
+ }
30
+
31
+ public void OnMenuClosed()
32
+ {
33
+ DuoMonetization.HideBanner();
34
+ }
35
+
36
+ public void ContinueAfterLevelWithOptionalInterstitial()
37
+ {
38
+ DuoMonetization.ShowInterstitial(LoadNextLevel);
39
+ }
40
+
41
+ public void OfferRewardedCoins()
42
+ {
43
+ DuoMonetization.ShowRewarded(rewardEarned =>
44
+ {
45
+ if (rewardEarned)
46
+ {
47
+ GrantCoins();
48
+ DuoAnalytics.LogEvent("rewarded_coins_granted", "amount", 100L);
49
+ }
50
+ });
51
+ }
52
+
53
+ public void OnLoadingScreenShown()
54
+ {
55
+ DuoMonetization.ShowAppOpen();
56
+ }
57
+
58
+ public void OnMainContentReady()
59
+ {
60
+ DuoMonetization.HideAppOpen();
61
+ }
62
+
63
+ public void OnPurchaseStarted()
64
+ {
65
+ DuoMonetization.BeginBlockingModal(StoreModalReason);
66
+ }
67
+
68
+ public void OnPurchaseFinishedOrCancelled()
69
+ {
70
+ DuoMonetization.EndBlockingModal(StoreModalReason);
71
+ }
72
+
73
+ public void OpenPrivacyChoices()
74
+ {
75
+ DuoMonetization.ShowPrivacyOptions();
76
+ }
77
+
78
+ private static void HandleMonetizationStateChanged(MonetizationState state)
79
+ {
80
+ Debug.Log($"Monetization state: {state}");
81
+ }
82
+
83
+ private static void LoadNextLevel()
84
+ {
85
+ Debug.Log("Continue the game flow here.");
86
+ }
87
+
88
+ private static void GrantCoins()
89
+ {
90
+ Debug.Log("Grant the earned reward here.");
91
+ }
92
+ }
@@ -0,0 +1,7 @@
1
+ # Basic Integration Sample
2
+
3
+ Import this sample from Package Manager after completing **Tools > DuoLabz > Monetization > Create or Repair Setup**.
4
+
5
+ `MonetizationGameplayExample` demonstrates the public game-facing API. Attach it to a screen controller only as a reference; the persistent managers are created by the `DuoMonetization` bootstrap prefab and must not be added to individual scenes.
6
+
7
+ Replace the example reward and navigation methods with your game's real implementations. Never grant a rewarded item unless the callback value is `true`.
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "com.duolabz.monetization",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.8.3",
4
+ "displayName": "Duo Monetization (Binary)",
5
+ "description": "Production-oriented Firebase Remote Config, Google Mobile Ads, consent, app-open safety, and telemetry framework for DuoLabz Unity games.",
6
+ "unity": "2022.3",
7
+ "dependencies": {
8
+ "com.unity.modules.unitywebrequest": "1.0.0",
9
+ "com.unity.ugui": "1.0.0"
10
+ },
11
+ "author": {
12
+ "name": "DuoLabz",
13
+ "url": "https://duolabz.ae"
14
+ },
15
+ "keywords": [
16
+ "ads",
17
+ "admob",
18
+ "firebase",
19
+ "monetization",
20
+ "telemetry"
21
+ ],
22
+ "samples": [
23
+ {
24
+ "displayName": "Basic Integration",
25
+ "description": "Game-facing calls for banners, interstitials, rewarded ads, app-open safety, privacy options, and analytics.",
26
+ "path": "Samples~/Basic Integration"
27
+ }
28
+ ],
29
+ "license": "Proprietary",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/JunaidUmar/DuoFrameworkBinary.git"
33
+ }
34
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 42f262b8ff6b541db43fca6df78dded1
3
+ PackageManifestImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": "2.8.3",
3
+ "unity": "2022.3.62f2",
4
+ "sha256": {
5
+ "Editor/DuoLabz.Monetization.Binary.Installer.dll": "0b4f3777f53eecba45372a8e5e5ebf6b5efa26328faf10fa1efa127d20674db2",
6
+ "Editor/DuoLabz.Monetization.Binary.Installer.dll.meta": "d5f087a3696eb332126b31f1b22055e1370f01e37d2f7404f5b49d3a491508b9",
7
+ "Editor/DuoLabz.Monetization.Editor.dll": "9e2b36c6ca71845c08f45d13c025896d08a836d4860ba574b5b4998603770bd1",
8
+ "Editor/DuoLabz.Monetization.Editor.dll.meta": "72b76800f865433b549457d9f776947f11182494e52eae470c25461dd95672b2",
9
+ "Editor.meta": "f9d7f8405e78801b7159a1bb0c63e4f1238cda953107ee7fdfdbf3585c86a1ce",
10
+ "LICENSE.md": "efafc94157a679f3b294b3aeadbd163ca7a31cd4d1aa08dd4b04b36ed2836c6c",
11
+ "LICENSE.md.meta": "cd56f690c16d0dfea4954aad05ba256584b09148b7decf07124b4e0bafccd0cd",
12
+ "Migration/source-script-map.json": "ff020a982593292738241325db4405037e2d12f69f10091abdc379685e50b7ab",
13
+ "Migration/source-script-map.json.meta": "975555ea3bd5cd375b3a9278e389defedc8b9dd54cbfd4b20d092c90fc053518",
14
+ "Migration.meta": "cf4e94c3ad42241d48a0e5a4485443216801ee251579609fa442cb780a23aebb",
15
+ "README.md": "7f1832d85fb2fdf304a765a7a3853a85bd53c2a9c2bffe520467ff893891d394",
16
+ "README.md.meta": "c8ee5a06bd143d7ec25a4d5d29566ce57f0830ecfd4502ae06ab190b57b7e37b",
17
+ "Runtime/DuoLabz.Monetization.dll": "04cf376ee716e637216228a66ef96e50fbc0a52090bdb249e876961901fa6ff3",
18
+ "Runtime/DuoLabz.Monetization.dll.meta": "1899437329f12195073ea2fa1a9132cb31b29453bf8e212155834e70d7f15084",
19
+ "Runtime/link.xml": "ab59a53a443b415b79528f49498ff57514d82342b342f39d536dcb50964f7ccf",
20
+ "Runtime/link.xml.meta": "e409870251fa05ae48359b2cd230447a56389126afdb93de15a00ff921754f3e",
21
+ "Runtime.meta": "793622061014a7242eca3da0ad38254f1cdb77c9f5f220e584991f5942066ba4",
22
+ "Samples~/Basic Integration/MonetizationGameplayExample.cs": "de2b376bb445cb1d922249bcbe6ace266e18dbd4e63229f327fac31fd4032ce5",
23
+ "Samples~/Basic Integration/README.md": "76aa8bab0a3f0511a4cc5722c3c21108d9bcb3eb156e9e57b92c0b393c8d4098",
24
+ "package.json": "cc073725b1fe8912e0f910e838d93593ad0dfcac2c99ff8030319bb7c20a850c",
25
+ "package.json.meta": "c9a4f1f149b6b6ae1f0c64ff62704a5fd17413a9612999fa4958d5daa6afc308",
26
+ "release-manifest.json.meta": "3f19b0a8cc185cab02b5865fa0ffc81688b68ce4c63a3f6a71f0997fd44d4317"
27
+ }
28
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 2d521175997f59c68309f84f00d8cded
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: