t1k:unity:tof:notification
| Field | Value |
|---|---|
| Module | tof |
| Version | 3.46.8 |
| Effort | high |
| Tools | — |
Keywords: mobile-ux, notification, permission, push notification, smart-prompt
How to invoke
Section titled “How to invoke”/t1k:unity:tof:notificationNotification
Section titled “Notification”Scope — this is a candidate index, not an inventory. This skill indexes one source folder. A feature can span
Assets/TheOneFeature/,Packages/com.gdk.*, and siblingAssets/TheOne.*packages, and this skill will only show the folder it was built from. A capability missing here is not evidence that it is absent — verify against source (grep over a stated scope) before concluding anything does not exist. See The1Studio/theonekit-unity#350.
Adding or changing a notification campaign (CSV, sound, large icon, big picture, tap deep link)? Use
t1k-unity-tof-notification-campaigns. This skill covers the framework feature itself: permission handling and the smart-prompt.
How the permission flow works
Section titled “How the permission flow works”The notification system itself lives in UITemplate
(Assets/UITemplate/Sources/Scripts/Modules/LiveOps/Notification/); this feature is a thin layer on top.
TOFNotificationInitOnLoadoverridesIsInitNotificationOnLoadtofalse, so UITemplate does not initialize notifications (and ask for permission) on load.NotificationServicesubscribes toIFeatureScreenManager.CurrentActiveScreen. On the first screen change whereIUserExperienceService.CanRequestNotificationPermissionis true it waits 1 second, then callsINotificationService.InitNotification(). It requests once per session.NotificationVContainer.RegisterNotificationregisters the service;NotificationValidatorchecks that registration exists.
Purpose
Section titled “Purpose”The Notification feature provides a smart notification permission handling system for Unity mobile games with user experience-aware timing. It seamlessly integrates with the user experience system to request notification permissions at optimal moments, ensuring a non-intrusive user experience while maximizing permission grant rates.
Public API
Section titled “Public API”class
NotificationService(NotificationService.cs)NotificationValidator(NotificationValidator.cs)NotificationVContainer(NotificationVContainer.cs)
Signals / Events
Section titled “Signals / Events”None detected.
Config / ScriptableObjects
Section titled “Config / ScriptableObjects”None detected.
Integration Steps
Section titled “Integration Steps”- Reference package
TheOneFeaturein your project. - Register the Notification services via VContainer (see Architecture).
- Configure any ScriptableObjects listed in Config section.
- Subscribe to signals listed in Signals / Events to react to state changes.
Architecture
Section titled “Architecture”Detected public types (3): class
NotificationService(NotificationService.cs)NotificationValidator(NotificationValidator.cs)NotificationVContainer(NotificationVContainer.cs)
Detected DI registrations:
NotificationService
Dependencies
Section titled “Dependencies”Read from the three .asmdef files under the source folder (verified on disk); the .asmdef stays
authoritative if they drift.
| Assembly | Role | References |
|---|---|---|
TheOne.Features.Notification | Runtime | TheOne.Features.Core, UITemplate.Scripts, UITemplate.LocalData, UITemplate.UI, UITemplate.LiveOps, GameFoundation.UIModule, TheOne.Features.UserExperience.Core, TheOne.Features.Gameplay.Core, TheOne.Lifecycle, TheOne.DI, TheOne.DI.VContainer, TheOne.Data.Serializers.Csv, UniTask, R3.Unity |
TheOne.Features.Notification.DI | VContainer registration | TheOne.Features.Notification, VContainer, TheOne.Extensions.VContainer |
TheOne.Features.Notification.Editor | Editor-only validator | Runtime + DI assemblies, TheOne.Features.Editor, VContainer, GameFoundation.Editor, TheOne.Extensions.VContainer, TheOne.Data.Serializers.Csv |
The smart-prompt depends on TheOne.Features.UserExperience.Core: that is the user-experience system it
uses to pick the moment to ask for permission.
Hard rules
Section titled “Hard rules”TheOne.Features.NoInternet.Editorin the namespace list below is not a typo in this skill — it is a copy-paste bug in upstream source, and the skill is reporting it faithfully.Core/Features/Notification/Editor/NotificationValidator.cs:1declaresnamespace TheOne.Features.NoInternet.Editoreven though its assembly isTheOne.Features.Notification.Editor(verified on disk; the asmdef sets norootNamespace, so nothing forces the two to agree). Do not “correct” it to…Notification.Editorhere — that would make this skill describe a namespace that does not exist, andusingit would not compile. The fix belongs upstream inTheOneFeature; until it lands, code referencing that validator must use theNoInternetnamespace.
References
Section titled “References”- Source:
Assets/TheOneFeature/Core/Features/Notification/ - Doc:
Assets/TheOneFeature/Core/Features/Notification/README.md - Doc:
Assets/TheOneFeature/Core/Features/Notification/CHANGELOG.md - Namespace:
TheOne.Features.NoInternet.Editor,TheOne.Features.Notification.DI,TheOne.Features.Notification.Services