msw-sprite-ruid
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMSW Sprite RUID
MSW Sprite RUID
—
为SpriteRendererComponent.SpriteRUID
(世界场景)或SpriteGUIRendererComponent.ImageRUID
(UI界面)分配RUID的规则
SpriteRendererComponent.SpriteRUIDSpriteGUIRendererComponent.ImageRUIDRules for assigning a RUID to (world) or
(UI).
SpriteRendererComponent.SpriteRUIDSpriteGUIRendererComponent.ImageRUIDNative type support
原生类型支持
Both components accept a or RUID directly — no extra
animator component required.
spriteanimationclip| Component | Property | Value form | Native RUID types |
|---|---|---|---|
| | plain string | |
| | | |
lua
-- 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 / RUID assigned without the prefix
fails silently (no error, nothing renders).
skeletonavataritemthumbnail://两个组件均直接接受或类型的RUID——无需额外的动画器组件。
spriteanimationclip| 组件 | 属性 | 值格式 | 原生RUID类型 |
|---|---|---|---|
| | 纯字符串 | |
| | | |
lua
-- 世界场景:sprite或animationclip类型的RUID均可生效
self.Entity.SpriteRendererComponent.SpriteRUID = ruid
-- UI界面:sprite或animationclip类型的RUID均可生效
self.Entity.SpriteGUIRendererComponent.ImageRUID = { DataId = ruid }若未添加前缀直接分配/类型的RUID,会静默失败(无报错,无内容渲染)。
thumbnail://skeletonavataritemanimationclip: single animation vs multi-state
animationclip:单动画与多状态
- Single looping animation (background deco, idle effect, prop): set or
SpriteRUIDdirectly to theImageRUIDRUID.animationclip - Multi-state (stand / move / attack / hit / die): use +
StateAnimationComponent. SeeActionSheet.msw-general/references/monster.md
- 单循环动画(背景装饰、 idle特效、道具):直接将或
SpriteRUID设置为ImageRUID类型的RUID。animationclip - 多状态(站立/移动/攻击/受击/死亡):使用+
StateAnimationComponent。详见ActionSheet。msw-general/references/monster.md
thumbnail://
prefix — static thumbnail from any resource
thumbnail://thumbnail://
前缀——从任意资源生成静态缩略图
thumbnail://Prepend to or to render a static
thumbnail image from any resource — useful for icons, preview images, and item
thumbnails.
thumbnail://SpriteRUIDImageRUIDthumbnail://<32-char hex RUID>Accepted types: · · ·
spriteanimationclipskeletonavataritemlua
-- World thumbnail (any resource type)
self.Entity.SpriteRendererComponent.SpriteRUID = "thumbnail://" .. anyRuid
-- UI thumbnail (any resource type)
self.Entity.SpriteGUIRendererComponent.ImageRUID = { DataId = "thumbnail://" .. anyRuid }在或前添加前缀,可将任意资源渲染为静态缩略图——适用于图标、预览图和物品缩略图。
SpriteRUIDImageRUIDthumbnail://thumbnail://<32位十六进制RUID>支持的资源类型: · · ·
spriteanimationclipskeletonavataritemlua
-- 世界场景缩略图(任意资源类型)
self.Entity.SpriteRendererComponent.SpriteRUID = "thumbnail://" .. anyRuid
-- UI界面缩略图(任意资源类型)
self.Entity.SpriteGUIRendererComponent.ImageRUID = { DataId = "thumbnail://" .. anyRuid }Primary use case: avataritem icons
主要使用场景:Avatar物品图标
avataritemthumbnail://lua
slotEntity.SpriteGUIRendererComponent.ImageRUID = {
DataId = "thumbnail://" .. avatarItemRuid,
}Search avatar item RUIDs with the skill ().
msw-searchsearchAvatarItemsavataritemthumbnail://lua
slotEntity.SpriteGUIRendererComponent.ImageRUID = {
DataId = "thumbnail://" .. avatarItemRuid,
}使用技能()搜索Avatar物品的RUID。
msw-searchsearchAvatarItemsCommon pitfalls
常见误区
- /
skeletondirectly intoavataritem/SpriteRUIDwithout prefix → silently invisible.ImageRUID - = static image only. For live animation, assign the
thumbnail://RUID directly (no prefix).animationclip - prefix goes inside
ImageRUID:DataId— not a separate field.{ "DataId": "thumbnail://..." } - ,
CostumeManagerComponent.Custom*Equip, andStateAnimationComponent.ActionSheetdo not acceptSkeletonRendererComponent.SkeletonRUID.thumbnail:// - Do not prepend to a RUID that was already retrieved as a thumbnail or icon image from
thumbnail://. 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 amsw-searchRUID, assign that RUID directly without any prefix.sprite - To search for RUIDs use the skill —
msw-searchfor avatar items;searchAvatarItemsfor everything else.searchResources
- 未添加前缀直接将/
skeleton类型的RUID赋值给avataritem/SpriteRUID→ 静默不显示。ImageRUID - 仅用于生成静态图片。若需实时动画,请直接分配
thumbnail://类型的RUID(无需前缀)。animationclip - 的前缀需放在
ImageRUID内部:DataId——而非单独字段。{ "DataId": "thumbnail://..." } - 、
CostumeManagerComponent.Custom*Equip和StateAnimationComponent.ActionSheet不支持SkeletonRendererComponent.SkeletonRUID前缀。thumbnail:// - 请勿对已通过获取的缩略图或图标图片RUID添加
msw-search前缀。该前缀用于将源资源转换为缩略图——对已为缩略图的sprite添加前缀在逻辑上是冗余的。若搜索目标为图标/缩略图并返回thumbnail://类型的RUID,请直接分配该RUID,无需添加任何前缀。sprite - 如需搜索RUID,请使用技能——
msw-search用于搜索Avatar物品;searchAvatarItems用于搜索其他所有资源。searchResources