How egametang/et works
Project type and purpose
• This is a Unity-based open-source game framework (ET) that unifies client and server development in C#.
• It provides a modular, component-based architecture for MMO/online games with built-in features like actor messaging, fiber scheduling, multi-protocol networking, 3D recast pathfinding, MongoDB persistence, hot-reload/patching, AI, test cases, etc.
File structure
• Top-level directories:
• Assets/ & ProjectSettings/ — standard Unity client project assets and settings (scenes, profiles, input, rendering, URP, etc.)
• Packages/ — Unity packages, including ET.Init (initialization), third-party integrations (MongoDB native plug-ins), tooling (Halodi registry manager), IDE plugins, and manifest.json/packages-lock.json for Unity Package Manager.
• Book/ — markdown documentation and tutorials (running guide, architecture, package creation, coroutine/actor/AI chapters).
• Scripts/ — project-wide utilities (publish scripts).
• .sln.DotSettings, .gitignore, Directory.Build.props — solution and build configuration.
• Key patterns:
• Package-based modularity: nearly all features (Init, networking, ECS, AI, UI) are distributed as self-contained Unity packages.
• Component-based entity system: Entities gain behavior by attaching components (e.g., MailboxComponent for actor messaging, numeric component for attribute sync).
• Network protocols: native KCP/TCP/WebSocket clients supported via plug-ins and .NET Core code.
• Hot-reload & patch: Unity Editor hot-reload via ILRuntime/HybridCLR; server DLL patching at runtime.
Insights from README
• Core architecture: component modules + fiber scheduler + async/await ETTask + actor model + multi-protocol reliable UDP + recast 3D pathfinding + MongoDB + test case and AI framework.
• Extensibility: any feature can become its own ET Package (see Book/8.1).
• Deployment: local dev in Unity (hot-reload, debug), production as .NET Core on Linux/Windows (scalable, distributed).
• Server roles: Login, Gate, Map (scene), DBProxy, Robot (test bot), possibly custom roles (chat, battle, etc.).
Essential details
• That the same code assemblies live on both client and server (shared folders/packages).
• Hot-reload and ILRuntime blocks in the client pipeline.
• Sequence flows for a sample RPC call or actor message.