Repository navigation
feat(mcp): add assets inspection and hot-reload tools - #712
Merged
Merged
Conversation
… be reloaded Manager.ReloadAsset and ReloadGroup now read files, parse atlases and run custom loaders on another goroutine, as Group.Load does, and apply the results on the engine goroutine once they finish. The call waits for that work or for its context; when the context ends first nothing is replaced and custom values that were never applied are released. Sounds, images with no file behind them and files at a density the screen does not show are reported in ReloadedAsset.Skipped instead of being reloaded: a sound decode failure was dropped while the tool reported success, generated textures failed every group reload, and reloading an unshown density replaced a multi-scale source with the wrong file. A group reload also skips an image its reader cannot find. The MCP results carry skipped per item and a skipped count, and reloaded is false when nothing was actually replaced. game_asset_reload with all: true now refuses a bridge whose only source is Config.ReloadAsset, materials sharing one file are reloaded once, the atlas memory estimate is shared through assets.EstimateAtlasBytes instead of a copy in game/mcp, and the Revision doc covers ReloadAsset and ReloadGroup.
houko
force-pushed
the
feat/mcp-assets-hotreload-469
branch
from
November 24, 2026 19:41
a5b6f18 to
8ee2bbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
game_assets_list,game_asset_reload, andgame_assets_reload_groupMCP tools inpackages/game/mcp/assets.gowith strictDisallowUnknownFields()decoding, JSON schemas, deterministic sorting, and hookup inpackages/game/mcp/mcp.goafter the inspect, loop, input, console, edit, replay and perf tools.Manager.Disposed,Manager.GroupNames,Manager.LookupGroup,Manager.GroupStats,Group.Stats,EstimateAtlasBytes) plus in-placeManager.ReloadAssetandManager.ReloadGroupinpackages/game/assets. Reads, atlas parses and custom loaders run off the engine goroutine, asGroup.Loaddoes; the results are applied on the engine goroutine, so reloading an atlas updates existing*sprite.Atlaspointers and triggers redraws viaManager.Revision().skippedrather than reloaded or failed.ReloadFile/ReloadShaderFile/ReloadMaterialFileand path getters inpackages/game/resourceandpackages/game/tooling/hotreload, plusBridge.RegisterAsset,Bridge.RegisterAtlas, andConfig.ReloadAssetfallback support for single keys.reloaded: false,error: ...) while keeping the previous working asset active and the running game alive.docs/en/mcp.mdanddocs/zh/mcp.md, addchangelog.d/mcp-assets-hotreload.md, and add.agents/notes/implemented/feature/2026-11-24-mcp-assets-and-hot-reload.md.Verification
gofmtcleango tool nsgo testandgo tool nsgo check -target linux,webfor./assets,./mcp,./resource,./tooling/hotreloadgo tool nsgo test .(full suite)go run ./tools/changelog checkCloses #469