Home/Game Development/msw-sprite-ruid
M

msw-sprite-ruid

by @msw-gitv
4.4(120)

This skill provides native RUID type support for SpriteRendererComponent.SpriteRUID (world) and SpriteGUIRendererComponent.ImageRUID (UI) in game development. It enables direct playback of sprite and animationclip RUIDs and introduces a "thumbnail://" prefix to render static thumbnail images from any resource, including avatar items and skeletons. This streamlines the display and management of in-game assets, such as inventory icons and animated props, enhancing development efficiency and visual fidelity.

game-developmentsprite-renderingasset-managementui-renderinganimationGitHub
Installation
npx skills add https://github.com/msw-git/msw-ai-coding-plugins-official --skill msw-sprite-ruid
compare_arrows

Before / After Comparison

1
Before

Before this skill, developers had to implement complex rendering logic or additional components for different game asset types (e.g., skeletons, avatar items) to display them as static icons or play animations directly. This resulted in lengthy and error-prone development processes, especially when handling inventory item icons, which often required manual conversion or extensive resource management.

After

This skill allows developers to directly assign sprite or animationclip RUIDs to renderer components for immediate animation or static image display. With the "thumbnail://" prefix, this skill can instantly render any resource (including skeleton and avataritem) as a static thumbnail, significantly simplifying the generation and management of in-game icons (e.g., inventory slots), reducing development time from hours to minutes.

SKILL.md

MSW Sprite RUID

Rules for assigning a RUID to SpriteRendererComponent.SpriteRUID (world) or SpriteGUIRendererComponent.ImageRUID (UI).


Native type support

Both components accept a sprite or animationclip RUID directly — no extra animator component required.

ComponentPropertyValue formNative RUID types
SpriteRendererComponent (world)SpriteRUIDplain stringsprite, animationclip
SpriteGUIRendererComponent (UI)ImageRUID{ "DataId": "..." }sprite, animationclip
-- World: sprite or animationclip RUID both work
self.Entity.SpriteRendererComponent.SpriteRUID = ruid

-- UI: sprite or animationclip RUID both work
self.Entity.SpriteGUIRendererComponent.ImageRUID = { DataId = ruid }

A skeleton / avataritem RUID assigned without the thumbnail:// prefix fails silently (no error, nothing renders).


animationclip: single animation vs multi-state

  • Single looping animation (background deco, idle effect, prop): set SpriteRUID or ImageRUID directly to the animationclip RUID.
  • Multi-state (stand / move / attack / hit / die): use StateAnimationComponent + ActionSheet. See msw-general/references/monster.md.

thumbnail:// prefix — static thumbnail from any resource

Prepend thumbnail:// to SpriteRUID or ImageRUID to render a static thumbnail image from any resource — useful for icons, preview images, and item thumbnails.

thumbnail://<32-char hex RUID>

Accepted types: sprite · animationclip · skeleton · avataritem

-- World thumbnail (any resource type)
self.Entity.SpriteRendererComponent.SpriteRUID = "thumbnail://" .. anyRuid

-- UI thumbnail (any resource type)
self.Entity.SpriteGUIRendererComponent.ImageRUID = { DataId = "thumbnail://" .. anyRuid }

Primary use case: avataritem icons

avataritem RUIDs cannot render without thumbnail://. With the prefix they become item icons for inventory slots, shop listings, and equip previews.

slotEntity.SpriteGUIRendererComponent.ImageRUID = {
    DataId = "thumbnail://" .. avatarItemRuid,
}

Search avatar item RUIDs with the msw-search skill (searchAvatarItems).


Common pitfalls

  • skeleton / avataritem directly into SpriteRUID / ImageRUID without prefix → silently invisible.
  • thumbnail:// = static image only. For live animation, assign the animationclip RUID directly (no prefix).
  • ImageRUID prefix goes inside DataId: { "DataId": "thumbnail://..." } — not a separate field.
  • CostumeManagerComponent.Custom*Equip, StateAnimationComponent.ActionSheet, and SkeletonRendererComponent.SkeletonRUID do not accept thumbnail://.
  • Do not prepend thumbnail:// to a RUID that was already retrieved as a thumbnail or icon image from msw-search. The prefix converts a source resource into its thumbnail — applying it to an already-thumbnail sprite is logically redundant. If the search query targeted an icon / thumbnail image and returned a sprite RUID, assign that RUID directly without any prefix.
  • To search for RUIDs use the msw-search skill — searchAvatarItems for avatar items; searchResources for everything else.

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs2.6K
Rating4.4 / 5.0
Version
Updated2026年7月10日
Comparisons1

User Rating

4.4(120)
5
37%
4
43%
3
13%
2
5%
1
2%

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年6月21日
Last Updated2026年7月10日
🎁 Agent Knowledge Cards
Survey