{"id":14961058,"url":"https://github.com/3d-group/unity-simple-notifications","last_synced_at":"2025-10-24T20:30:48.278Z","repository":{"id":57203615,"uuid":"294879447","full_name":"3d-group/unity-simple-notifications","owner":"3d-group","description":"Simple UI notifications package for Unity game engine","archived":false,"fork":false,"pushed_at":"2024-02-21T04:07:40.000Z","size":5564,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-04T16:06:41.601Z","etag":null,"topics":["hacktoberfest","npm","unity","unity3d","upm-package","utilities"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3d-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-12T05:47:02.000Z","updated_at":"2024-02-21T04:07:44.000Z","dependencies_parsed_at":"2024-09-22T12:00:48.670Z","dependency_job_id":"81286110-e263-40ff-b3ab-1b276dfee035","html_url":"https://github.com/3d-group/unity-simple-notifications","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":"0.24561403508771928","last_synced_commit":"413115a0b93432f01e926cf38062efe98a585a8d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3d-group%2Funity-simple-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3d-group%2Funity-simple-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3d-group%2Funity-simple-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3d-group%2Funity-simple-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3d-group","download_url":"https://codeload.github.com/3d-group/unity-simple-notifications/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238030288,"owners_count":19404859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","npm","unity","unity3d","upm-package","utilities"],"created_at":"2024-09-24T13:23:44.208Z","updated_at":"2025-10-24T20:30:47.622Z","avatar_url":"https://github.com/3d-group.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm package](https://img.shields.io/npm/v/com.3d-group.unity-simple-notifications)](https://www.npmjs.com/package/com.3d-group.unity-simple-notifications)\n[![openupm](https://img.shields.io/npm/v/com.3d-group.unity-simple-notifications?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.3d-group.unity-simple-notifications/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n# Unity simple notifications\n\nSimple but powerful UI notifications package for Unity game engine.\n\n- [How to use](#how-to-use)\n- [Install](#install)\n  - [via npm](#via-npm)\n  - [via OpenUPM](#via-openupm)\n  - [via Git URL](#via-git-url)\n  - [Tests](#tests)\n- [Performance and thread safety](#performance-and-thread-safety-rocket)\n- [Configuration](#configuration)\n\n\u003c!-- toc --\u003e\n\n## How to use\n\n1. Right click scene hierarchy\n2. Click UI/Notifications\n\n![HowTo](Documentation~/images/HowTo.png)\n\nNow you can send Notifications from your script like this:\n```c#\nNotifications.Send(\"Hello world\");\n```\n\n![Notification](Documentation~/images/SimpleShowCase.gif)\n\nSpecify type (changes notification color) and click events with optional parameters:\n```c#\nprivate void Error()\n{\n   Notifications.Send(\"Spooky error!\", NotificationType.Error, OnClick);\n}\n\npublic void OnClick()\n{\n    // Do something.\n}\n```\nThere is also async overload:\n```c#\nawait Notifications.SendAsync(\"Warning!\", NotificationType.Warning);\n```\n\nYou can also hook Translation / any fuction to handle messages before sending like so:\n```c#\nprivate void Start()\n{\n    Notifications.TranslationFunction = Translate;\n}\n\nprivate string Translate(string key)\n{\n    // Do something.\n    return key;\n}\n```\n\n## Install\n\n### via npm\n\nOpen `Packages/manifest.json` with your favorite text editor. Add a [scoped registry](https://docs.unity3d.com/Manual/upm-scoped.html) and following line to dependencies block:\n```json\n{\n  \"scopedRegistries\": [\n    {\n      \"name\": \"npmjs\",\n      \"url\": \"https://registry.npmjs.org/\",\n      \"scopes\": [\n        \"com.3d-group\"\n      ]\n    }\n  ],\n  \"dependencies\": {\n    \"com.3d-group.unity-simple-notifications\": \"1.0.0\"\n  }\n}\n```\nPackage should now appear in package manager.\n\n### via OpenUPM\n\nThe package is also available on the [openupm registry](https://openupm.com/packages/com.3d-group.unity-simple-notifications). You can install it eg. via [openupm-cli](https://github.com/openupm/openupm-cli).\n\n```\nopenupm add com.3d-group.unity-simple-notifications\n```\n\n### via Git URL\n\nOpen `Packages/manifest.json` with your favorite text editor. Add following line to the dependencies block:\n```json\n{\n  \"dependencies\": {\n    \"com.3d-group.unity-simple-notifications\": \"https://github.com/3d-group/unity-simple-notifications.git\"\n  }\n}\n```\n\n### Tests\n\nThe package can optionally be set as *testable*.\nIn practice this means that tests in the package will be visible in the [Unity Test Runner](https://docs.unity3d.com/2017.4/Documentation/Manual/testing-editortestsrunner.html).\n\nOpen `Packages/manifest.json` with your favorite text editor. Add following line **after** the dependencies block:\n```json\n{\n  \"dependencies\": {\n  },\n  \"testables\": [ \"com.3d-group.unity-simple-notifications\" ]\n}\n```\n\n## Performance and thread safety :rocket:\n\n- Notifications are rate limited based on duplicates sent recently and max notifications queue length \n- Notifications can be send from another thread. Creating GameObjects still always happens on main thread\n\nHere is how it looks when billion notifications are sent simultaneously from another thread: :smile:\n\n![Notification](Documentation~/images/PerformanceShowCase.gif)\n\nTry it yourself! Code:\n```c#\nusing UnityEngine;\nusing System.Threading;\nusing Group3d.Notifications;\n\npublic class TEST : MonoBehaviour\n{\n    private void Start()\n    {\n        new Thread(() =\u003e\n        {\n            Thread.CurrentThread.IsBackground = true;\n            var r = new System.Random();\n            int counter = 0;\n            while (counter \u003c 1000000000)\n            {\n                Notifications.Send($\"Test {r.Next(0, 10000)}\");\n                counter++;\n            }\n        }).Start();\n    }\n}\n\n```\n\n## Configuration\n\nConfurable from the inspector:\n\n![Inspector](Documentation~/images/Inspector.png)\n\nCustom notification prefab can be created and assigned in the inspector. If doing so, consider these things:\n- Prefab must have NotificationUI component (included in the package)\n- Prefab must have RectTransform component with anchors set to top-stretch\n\nIf prefab is null, notification will be created dynamically.\n\nOptional Font parameter is only used when notification is created dynamically - if that is the only thing you want to change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3d-group%2Funity-simple-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3d-group%2Funity-simple-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3d-group%2Funity-simple-notifications/lists"}