Orion gameplay message router

From OrionUE/Orion_FreeEdition · View interactive version

Orion gameplay message router is an AI agent skill from the GitHub repository OrionUE/Orion_FreeEdition. Use when Codex works on Unreal Engine GameplayMessageRouter or tag-based gameplay messaging in this framework: UGameplayMessageSubsystem, GameplayMessageRuntime, BroadcastMessage, RegisterListener, FGameplayMessageListenerHandle, EGameplayMessageMatch, UAsyncAction_ListenForGameplayMessage, FGamepla

How to use this skill

Skill file

Unreal Gameplay Message Router

本 Skill 用于在框架里编写、审查和排查基于 GameplayTag channel 的游戏消息收发。它适合让互不直接引用的 gameplay、Ability、UI、GameFeature、通知和状态处理系统解耦通信。

工作流

  1. 先读取 .uproject 和目标模块 *.Build.cs,确认 GameplayMessageRouter 插件启用,代码模块依赖 GameplayMessageRuntime。
  2. 读取 references/gameplay-message-router.zh-CN.md,先判断任务应该用 GameplayMessageRouter、委托、接口、GameplayEvent、复制变量还是 RPC。
  3. 选择消息 channel:使用稳定的 GameplayTag,通常用 Verb.*.Message、Ability.*.Message、Gameplay.*.Message 或 UI/系统命名空间。
  4. 选择 payload:优先使用已有 FCoreVerbMessage 或 FGameplayVerbMessage;复杂业务用新的 USTRUCT(BlueprintType),同一个 channel 的发送者和监听者必须约定同一 payload 类型。
  5. C++ 发送使用 UGameplayMessageSubsystem::Get(WorldContext).BroadcastMessage(Channel, Payload);C++ 监听保存 FGameplayMessageListenerHandle 并在 EndPlay、Deinitialize 或失效点注销。
  6. Blueprint 监听使用 Listen For Gameplay Messages async node,指定 PayloadType,收到后用输出 payload;Blueprint 发送使用 Broadcast Message。
  7. 多人游戏先判断网络边界:本地 message router 不自动复制。需要跨端时通过 GameState multicast、PlayerState client RPC、replicated fast array 或现有网络系统把消息送到目标端,再在目标端本地广播。
  8. 调试时可启用 GameplayMessageSubsystem.LogMessages 1,同时检查 channel、payload struct、match type 和监听生命周期。

路由

Reference

读取 references/gameplay-message-router.zh-CN.md 获取消息系统能力图、委托对比、C++/Blueprint 模板、网络桥接规则、常见错误和验证清单。

硬规则

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.