> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Asset

> Asset

# Asset

对已包含在触控适配包中的自定义图像的引用。

## 属性

`type` - *string*。"asset"

`value` - *string*。所引用的图像资源的名称。

`opacity` - *number*。应用于资源的不透明度。默认为 1.0。

## 示例

```JSON theme={null}
{
    "type": "asset",
    "value": "someImage",
    "opacity": 1
}
```

## 备注

所有资源要么是 PNG 图像，要么是 PNG 精灵图搭配 JSON 精灵图集。

资源必须以所有分辨率（1.0x、1.5x、2.0x、3.0x、4.0x）提供，且至少以中性语言提供。也支持本地化资源。

`value` 是所包含资源的名称（不带文件扩展名）。示例：对于名为 "someImage.png" 的资源，值应为 "someImage"。

对于精灵资源，`value` 字段应采用 `spriteSheetFileName/spriteName` 的形式。示例："icons/fire" 将映射到 icons.png 和 icons.json 文件中的 'fire' 精灵。

资源的预期尺寸取决于资源的使用位置。对于精灵资源，各个精灵必须符合其使用位置的预期尺寸。

请查看每个控件的文档，了解每个使用区域的具体尺寸。

## 相关控件

[Arcade Buttons](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-arcadebuttons)\
[Button](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-button)\
[Directional Pad](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-directionalpad)\
[Joystick](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-joystick)\
[Throttle](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-throttle)\
[Touchpad](https://devdocs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-touchpad)

## 另请参阅

[Touch Adaptation Kit 参考](https://devdocs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)


## Related topics

- [Delete Asset](https://devdocs.xbox.com/api-reference/multiplayerserver/delete-asset.md)
- [List Asset Summaries](https://devdocs.xbox.com/api-reference/multiplayerserver/list-asset-summaries.md)
- [Branding and marketing assets](https://devdocs.xbox.com/publishing/game-publishing/resources/managed-support/how-to-access-branding-and-marketing-assets.md)
- [game_asset_deleted](https://devdocs.xbox.com/es/services/playfab/api-references/events/MultiplayerServers/game-asset-deleted.md)
