Skip to content

Red Dot System

Introduction

Description

The red dot system is a common notification system in games, used to remind players of new content, unread messages, or available actions. The ET framework provides an efficient and easy-to-use red dot management system.

System Features

Diverse Red Dot Types

  • Regular Red Dot - Standard notification
  • Numeric Red Dot - Displays specific quantities
  • New Feature Red Dot - Special style notification
  • Tip Red Dot - Lightweight reminder
  • Important Red Dot - Highlighted display

Tree Node Management

  • Hierarchical Structure - Supports multiple parent-child node relationships
  • State Propagation - Automatically propagates status upward
  • Flexible Configuration - Supports diverse node settings

Developer Friendly

  • Simple API - Easy to understand and use
  • Example Scenes - Complete demonstration project
  • Visualization Tools - Convenient configuration interface
Assets/
├── Bundles/
│   ├── RedDot/     # Red dot system configuration
│   └── UI/
│       └── Other/  # Red dot prefab resources
├── Editor/
│   └── RedDot/     # Red dot configuration visualization tool
├── Resources/      # Configuration files
└── Scripts/
    └── ETCore/
        └── RedDot/ # Core code

Configuration Description

Red Dot Type Configuration

Configure basic red dot information through RedDotKeyAsset:

ParameterDescription
idUnique identifier for the red dot
desRed dot description
Red Dot ## Basic Usage

Red Dot Relationship Configuration

Configure basic red dot information through RedDotKeyAsset:

ParameterDescription
keyCorresponds to the id in RedDotKeyAsset
parentListList of parent nodes
flagsRed dot display type (Default/Number/New/Tips/Important)
Red Dot

Editor Tools

Red Dot Key-Value Editor

Path: ET/RedDot/RedDotKey Editor

Configure red dot basic information and Generate red dot enum definitions

Configure red dot basic information, generate red dot enum definitionsRed Dot

Red Dot Configuration Editor

Path: ET/RedDot/RedDotConfig Editor

Configure red dot parent nodes and Configure red dot types

Configure red dot parent nodesRed Dot
Configure red dot typesRed Dot

Basic Usage

TIP

During development, you only need to maintain the number of red dots, and don't need to worry about anything else.

Update Red Dot Count

csharp
RedDotSingleton.Instance.Set(ERedDotKeyType.Key4, 1, RedDotFlags.Number);

RedDotSingleton.Instance.Set(ERedDotKeyType.Key7, 1, RedDotFlags.Default);

//...
Red dot generated key-value enum
csharp
using System.ComponentModel;
namespace MH
{
    public enum ERedDotKeyType
    {
        [Description("None")]
        None = 0,

        [Description("Main Interface")]
        Key1 = 1,

        [Description("New Player Seven Day Sign-in")]
        Key2 = 2,

        [Description("Multi-level Menu")]
        Key3 = 3,

        [Description("Daily Tasks")]
        Key4 = 4,
        //...
    }
}

Usage Examples

UI Binding

Tip

RedDotItem.cs will automatically set up the subscription to red dot events in the Start method. Just attach it to objects that need to display red dots.

Red Dot

⚠️Important Notes⚠️

  1. Avoid circular references in red dot configuration
  2. Plan the red dot hierarchy structure reasonably, avoid excessive depth
  3. Clean up unnecessary red dot configurations promptly
  4. Regularly maintain and update red dot status

Example Repository

RedDotSystem

Technical Support

Get Help

  • 💬 Join QQ group for discussion (ET Framework Group) : 474643097
  • ⭐ Follow the project on GitHub for the latest updates

Released under the MIT License.