Skip to content

[WIP] Fix query_widget_properties and set_widget_properties issues#27

Draft
winyunq with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-query-widget-properties
Draft

[WIP] Fix query_widget_properties and set_widget_properties issues#27
winyunq with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-query-widget-properties

Conversation

Copilot AI commented May 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>query_widget_properties 无法读取属性,且 set_widget_properties 写入后编辑器中无任何变化</issue_title>
<issue_description>问题描述
query_widget_properties 无法读取属性,且 set_widget_properties 写入后编辑器中无任何变化。 疑似属性路径解析失效
详细复现步骤:

  1. 设置正确资产路径 (验证通过,控件树可见)
    mcp__Unreal-UMG-MCP__set_target_umg_asset(asset_path="/Game/UI/MainMenu.MainMenu")

  2. 尝试读取属性 → 返回空

mcp__Unreal-UMG-MCP__query_widget_properties(

widget_name="Btn_JoinGame",

properties=["Slot.Position", "Slot.Size", "Slot.Anchors", "Slot.Alignment"]

)

结果:{"status":"success"} — 无任何属性数据

  1. 尝试写入属性 → 返回成功但无效果

mcp__Unreal-UMG-MCP__set_widget_properties(

widget_name="Btn_JoinGame",

properties={

    "Slot.Position": [999, 999],  # 明显的值

    "Slot.Size": [400, 80]

}

)

mcp__Unreal-UMG-MCP__save_asset()

结果:文件被修改 (编译按钮变黄),但编辑器中控件位置/大小完全没变</issue_description>

<agent_instructions>根据用户所描述的情况,做一个可能的问题排查,修复可能涉及到的BUG。

我的猜测如下:
1:Query_widget问题可能是python server拦截了结果。请确定UE5插件是否完整返回了信息。如果返回了,那么检查Python是否有错误的解析,用success直接拦截结果。清理这些问题
2:是否是slot处处理有问题?例如我们是否需要在Slot处追加大小写处理?如果是Slot有大小写处理问题,我们是否有更加好的方法解决此问题。

针对这2个问题,分析问题并且修复他</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

query_widget_properties 无法读取属性,且 set_widget_properties 写入后编辑器中无任何变化

2 participants