{"id":24688783,"url":"https://github.com/aio-game/unity.notify","last_synced_at":"2025-06-11T21:32:54.132Z","repository":{"id":243346453,"uuid":"812108076","full_name":"AIO-GAME/Unity.Notify","owner":"AIO-GAME","description":"✨ Lightweight Notification System ✨","archived":false,"fork":false,"pushed_at":"2024-12-13T02:27:57.000Z","size":803,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T09:21:52.519Z","etag":null,"topics":["event","notification","unity"],"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/AIO-GAME.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":".github/CONTRIBUTING","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-08T01:34:43.000Z","updated_at":"2024-12-13T02:27:55.000Z","dependencies_parsed_at":"2024-06-25T09:19:18.603Z","dependency_job_id":"af173ee7-8a03-4b43-bbad-05d7545ec2d2","html_url":"https://github.com/AIO-GAME/Unity.Notify","commit_stats":null,"previous_names":["aio-game/unity.notify"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/AIO-GAME/Unity.Notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIO-GAME%2FUnity.Notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIO-GAME%2FUnity.Notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIO-GAME%2FUnity.Notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIO-GAME%2FUnity.Notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AIO-GAME","download_url":"https://codeload.github.com/AIO-GAME/Unity.Notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIO-GAME%2FUnity.Notify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259345901,"owners_count":22843612,"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":["event","notification","unity"],"created_at":"2025-01-26T17:18:36.796Z","updated_at":"2025-06-11T21:32:54.096Z","avatar_url":"https://github.com/AIO-GAME.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e \n\u003cimg src=\"RES/Logo.svg\" width=\"256\" height=\"256\" alt=\"https://github.com/AIO-GAME\"\u003e \n\u003c/p\u003e\n\u003cp align=\"center\" style=\"font-size: 24px;\"\u003e \n\u003cb\u003eUnity Notify\u003c/b\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"README_EN.md\"\u003eEnglish\u003c/a\u003e | 简体中文\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/AIO-GAME/Unity.Notify/security/policy\"\u003e \n\u003cimg alt=\"\" src=\"https://img.shields.io/github/package-json/unity/AIO-GAME/Unity.Notify\"\u003e \n\u003c/a\u003e\n\u003ca href=\"https://github.com/AIO-Game/Unity.Notify\"\u003e\n\u003cimg src=\"https://img.shields.io/github/license/AIO-Game/Unity.Notify\" alt=\"\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/AIO-Game/Unity.Notify\"\u003e\n\u003cimg src=\"https://img.shields.io/github/languages/code-size/AIO-Game/Unity.Notify?label=size\" alt=\"\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://openupm.com/packages/com.aio.notify/\"\u003e\n\u003cimg src=\"https://img.shields.io/npm/v/com.aio.notify?label=openupm\u0026amp;registry_uri=https://package.openupm.com\" alt=\"\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## ⚙ 安装\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003cspan style=\"color: deepskyblue; \"\u003e\u003cb\u003ePackages Manifest\u003c/b\u003e\u003c/span\u003e\n\u003c/summary\u003e\n\n````json\n{\n  \"dependencies\": {\n    \"com.aio.notify\": \"latest\"\n  },\n  \"scopedRegistries\": [\n    {\n      \"name\": \"package.openupm.com\",\n      \"url\": \"https://package.openupm.com\",\n      \"scopes\": [\n        \"com.aio.notify\"\n      ]\n    }\n  ]\n}\n````\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003cspan style=\"color: deepskyblue; \"\u003e\u003cb\u003eUnity PackageManager\u003c/b\u003e\u003c/span\u003e\n\u003c/summary\u003e\n\n\u003e open upm *中国版*\n\n~~~\nName: package.openupm.cn\nURL: https://package.openupm.cn\nScope(s): com.aio.notify\n~~~\n\n\u003e open upm *国际版*\n\n~~~\nName: package.openupm.com\nURL: https://package.openupm.com\nScope(s): com.aio.notify\n~~~\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003cspan style=\"color: deepskyblue; \"\u003e\u003cb\u003eCommand Line\u003c/b\u003e\u003c/span\u003e\n\u003c/summary\u003e\n\n\u003e open *upm-cli*\n\n~~~\nopenupm add com.aio.notify\n~~~\n\n\u003c/details\u003e\n\n## ⭐ 关于\n\n- **Unity Notify** 是一个轻量级的事件通知系统，支持事件订阅、广播和取消订阅。\n- ✅ **支持** 事件类实现。\n- ✅ **支持** 事件参数传递。\n- ✅ **支持** 事件参数泛型。\n- ✅ **支持** 事件优先级。\n- ✅ **支持** 事件订阅。\n- ✅ **支持** 事件取消订阅。\n- ✅ **支持** 事件广播执行基于协程，不阻塞主线程。\n- ✅ **支持** 事件自动注册。\n- ✅ **支持** 事件自动取消注册。\n- ✅ **支持** 事件自动广播。\n- ✅ **支持** 事件自动优先级。\n\n## 📚 使用\n\n\u003ch4\u003e初始化\u003c/h4\u003e\n\n```csharp \nEventSystem.Initialize();\n``` \n\n\u003ch4\u003e注册事件\u003c/h4\u003e\n\n```csharp\nEventSystem.AddListener(eid, OnEvent);\nEventSystem.AddListener\u003c[T1~T9]\u003e(eid, OnEvent);\n``` \n\n\u003ch4\u003e广播事件\u003c/h4\u003e\n\n```csharp\nEventSystem.Broadcast(eid);\nEventSystem.Broadcast(eid, [T1~T9]);\n```  \n\n\u003ch4\u003e注销事件\u003c/h4\u003e\n\n```csharp\nEventSystem.RemoveListener(eid, OnEvent);\nEventSystem.RemoveListener\u003c[T1~T9]\u003e(eid, OnEvent);\nEventSystem.RemoveListener(eid);\n```  \n\n\u003ch4\u003e自动注册事件\u003c/h4\u003e\n\n```csharp\npublic class EventListener1 : EventHandler\n{\n    public override int Key { get; } =\u003e 0;\n    \n    protected override void Invoke() =\u003e Console.WriteLine(\"OnEvent\");\n}\n\npublic class EventListener2 : EventHandler\u003c[T1~T9]\u003e\n{\n    public override int Key { get; } =\u003e 0;\n    \n    protected override void Invoke(\u003c[T1~T9]\u003e args) =\u003e Console.WriteLine(\"OnEvent\");\n}\n\n``` \n\n## ✨ 贡献者\n\n\u003c!-- readme: collaborators,contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/xinansky\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/45371089?v=4\" width=\"64;\" alt=\"xinansky\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003exinansky\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/Starkappa\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/155533864?v=4\" width=\"64;\" alt=\"Starkappa\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eStarkappa\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors -end --\u003e\n\n## 📢 致谢\n\n- **谢谢您选择我们的扩展包。**\n- **如果此软件包对您有所帮助。**\n- **请考虑通过添加⭐来表示支持。**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-game%2Funity.notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faio-game%2Funity.notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-game%2Funity.notify/lists"}