{"id":26556705,"url":"https://github.com/qqw1584913629/reddotsystem","last_synced_at":"2026-05-16T08:43:23.926Z","repository":{"id":283652805,"uuid":"952291635","full_name":"qqw1584913629/RedDotSystem","owner":"qqw1584913629","description":"基于Unity的轻量级红点提示系统，支持多样化红点类型和树形节点管理 | A lightweight red dot notification system for Unity with diverse dot types and tree-based node management","archived":false,"fork":false,"pushed_at":"2025-03-21T10:37:40.000Z","size":12995,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T02:43:13.877Z","etag":null,"topics":["csharp","game","game-development","reddot","unity"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","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/qqw1584913629.png","metadata":{"files":{"readme":"README-EN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-21T03:31:11.000Z","updated_at":"2025-06-13T07:11:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3be838c3-9c8b-4d1e-9698-62fe511f1381","html_url":"https://github.com/qqw1584913629/RedDotSystem","commit_stats":null,"previous_names":["qqw1584913629/reddotsystem"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/qqw1584913629/RedDotSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqw1584913629%2FRedDotSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqw1584913629%2FRedDotSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqw1584913629%2FRedDotSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqw1584913629%2FRedDotSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qqw1584913629","download_url":"https://codeload.github.com/qqw1584913629/RedDotSystem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqw1584913629%2FRedDotSystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265934208,"owners_count":23852089,"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":["csharp","game","game-development","reddot","unity"],"created_at":"2025-03-22T11:25:07.212Z","updated_at":"2026-05-16T08:43:23.900Z","avatar_url":"https://github.com/qqw1584913629.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e🔴 RedDotSystem\u003c/h1\u003e\n    \u003cp\u003eA lightweight, highly extensible red dot notification system developed for Unity\u003c/p\u003e\n    \u003cp\u003e\u003ca href=\"README.md\"\u003e中文文档\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\n\u003cp align=\"center\"\u003e\n\n![Demo](Images/Gif.gif)\n\n\u003c/p\u003e\n\u003c/div\u003e\n\n## ✨ Features\n\n### 🎯 Diverse Red Dot Types\n- **Standard Red Dot** - Regular notification\n- **Numeric Red Dot** - Displays specific quantities\n- **New Feature Red Dot** - Special style notification\n- **Tip Red Dot** - Light reminder\n- **Important Red Dot** - Highlighted display\n\n### 🌲 Tree Node Management\n- **Hierarchical Structure** - Supports multiple parent-child node relationships\n- **State Propagation** - Automatic upward state transmission\n- **Flexible Configuration** - Supports diverse node settings\n\n### 🛠 Developer Friendly\n- **Simple API** - Easy to understand and use\n- **Example Scenes** - Complete demo project\n- **Visual Tools** - Convenient configuration interface\n\n## 📁 Project Structure\n\n```plaintext\nAssets/\n├── Configs/        # Configuration files\n│   └── RedDot/     # Red dot system configs\n├── Editor/         # Editor extension tools\n│   └── RedDot/     # Red dot configuration tools\n├── Prefabs/        # Prefab resources\n│   ├── RedDotItem.prefab          # Basic red dot\n│   ├── RedDotItem_Free.prefab     # Free label\n│   └── RedDotItem_New.prefab      # New feature label\n├── Resources/      # Resource files\n├── Scenes/         # Example scenes\n└── Scripts/        # Core code\n    └── RedDot/     # Red dot system implementation\n```\n\n## 🚀 Installation\n\n### 📦 Method 1: Using Unity Package\n\n1. Go to [Releases](https://github.com/qqw1584913629/RedDotSystem/releases) page\n2. Download the latest version of `RedDotSystem.unitypackage`\n3. Import the file into your Unity project:\n   - Double-click the downloaded file\n   - Or select Assets \u003e Import Package \u003e Custom Package in Unity\n\n### ⚡ Method 2: Clone the Project\n\n```bash\n# Clone repository\ngit clone https://github.com/qqw1584913629/RedDotSystem.git\n\n# Or using SSH\ngit clone git@github.com:qqw1584913629/RedDotSystem.git\n```\n\nAfter opening the project in Unity Hub, check out the example scene:\n\u003e 📂 Assets/Scenes/RedDotSampleScene.unity\n\n## 🔧 Configuration Guide\n\n### Red Dot Type Configuration\nConfigure basic red dot information through `RedDotKeyAsset`:\n| Parameter | Description |\n|------|------|\n| id   | Unique identifier for the red dot |\n| des  | Red dot description |\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotKeyAsset.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\n### Red Dot Relationship Configuration\nConfigure parent-child relationships and display types through `RedDotConfigAsset`:\n| Parameter | Description |\n|------|------|\n| key  | Corresponds to id in RedDotKeyAsset |\n| parentList | List of parent nodes |\n| flags | Red dot display type (Default/Number/New/Tips/Important) |\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotConfigAsset.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\n## 🔨 Editor Tools\n\n### RedDotKey Editor\n\u003e Path: Tool/RedDot/RedDotKey Editor\n- Configure red dot basic information\n- Automatically generate red dot enum definitions\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotEditorWindow.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\n### RedDotConfig Editor\n\u003e Path: Tool/RedDot/RedDotConfig Editor\n- Visual configuration of red dot relationships\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotConfigEditorWindow1.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotConfigEditorWindow2.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\n## 📝 Usage Example\n\u003e No need to manually initialize each red dot, just set the quantity when needed.\n```csharp\n// Initialize red dot information\npublic class RedDotSingleton : MonoBehaviour\n{\n    private static RedDotSingleton _instance;\n    public static RedDotSingleton Instance =\u003e _instance;\n    public delegate void OnRdCountChange(RedDotNode node);\n    public Dictionary\u003cERedDotKeyType, RedDotNode\u003e AllRedDotNodes = new Dictionary\u003cERedDotKeyType, RedDotNode\u003e();\n    public RedDotConfigAsset _config;\n    public void Awake()\n    { \n        if (_instance == null)\n            _instance = this;\n        // TODO Load according to your project's resource management\n        // _config = Resources.Load\u003cRedDotConfigAsset\u003e(nameof(RedDotConfigAsset));\n        InitRedDotTreeNode();\n    }\n    public void InitRedDotTreeNode()\n    {\n        // Create all nodes\n        foreach (var config in _config.AllRedDotConfigList)\n        {\n            if (!AllRedDotNodes.ContainsKey(config.key))\n            {\n                var node = new RedDotNode { rdType = config.key };\n                AllRedDotNodes.Add(config.key, node);\n            }\n        }\n\n        // Establish parent-child relationships\n        foreach (var config in _config.AllRedDotConfigList)\n        {\n            var node = AllRedDotNodes[config.key];\n            foreach (var parentKey in config.parentList)\n            {\n                if (AllRedDotNodes.TryGetValue(parentKey, out var parentNode))\n                {\n                    node.parents.Add(parentNode);\n                    parentNode.rdChildrenDic[config.key] = node;\n                }\n            }\n        }\n    }\n    //...remaining code\n}\n```\n\u003e During development, only maintain the number of red dots, and ignore the rest.\n```csharp\n// Set a standard red dot\nRedDotSingleton.Instance.Set(ERedDotKeyType.Key1, 1, RedDotFlags.Default);\n\n// Set a numeric red dot\nRedDotSingleton.Instance.Set(ERedDotKeyType.Key1, 1, RedDotFlags.Number);\n```\n\n\u003e 💡 Tip: RedDotItem.cs automatically sets up red dot event subscriptions in its Start method. Just attach it to objects that need to display red dots.\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Images/RedDotItem.png\" width=\"auto\" alt=\"Red Dot System Example\"\u003e\n\u003c/p\u003e\n\n## ⚠️ Important Notes\n1. Avoid circular references in red dot configurations\n2. Plan red dot hierarchy structure reasonably, avoid excessive depth\n3. Clean up unused red dot configurations\n4. Regularly maintain and update red dot states\n\n## 📋 Development Plan\n- [x] To be determined\n\u003c!-- - [ ] Add more red dot styles\n- [ ] Optimize red dot update performance\n- [ ] Support red dot condition configuration\n- [ ] Add red dot statistics analysis --\u003e\n\n## 🔤 Font\nThis project uses [Maple Font](https://github.com/subframe7536/maple-font). This is an open-source monospaced programming font with rounded corners, ligatures, and console icons.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqw1584913629%2Freddotsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqqw1584913629%2Freddotsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqw1584913629%2Freddotsystem/lists"}