# 獲得アイテム数に応じた表示画像の切り替え方法

**URL:** <https://forums.unrealengine.com/t/topic/1616531>\
**Category:** 日本語 (Japanese)\
**Tags:** unreal-engine, question\
**Created:** [January 15, 2024, 1:34pm UTC](https://forums.unrealengine.com/t/topic/1616531 "2024-01-15T13:34:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![1902](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1902](https://forums.unrealengine.com/u/1902)\
**Post date:** [January 15, 2024, 1:34pm UTC](https://forums.unrealengine.com/t/topic/1616531/1 "2024-01-15T13:34:53Z")

</div>

UE5.0.3。アイテム数はゲームインスタンスで管理しています。

アイテム数が1なら画像A、アイテム数が2なら画像B、…アイテム数が10なら画像J、といったようにアイテム獲得と連動してUIを変化させたいと考えております。

どのような実装方法が考えられますでしょうか。  
ざっくりとした質問で申し訳ありません。ご助力いただけますと幸いです。

---

<div class="post-metadata">

**Author:** ![kiruru002](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kiruru002](https://forums.unrealengine.com/u/kiruru002)\
**Post date:** [January 16, 2024, 4:49pm UTC](https://forums.unrealengine.com/t/topic/1616531/2 "2024-01-16T16:49:41Z")

</div>

Blueprintでは配列型と辞書型しか提供されていないので、その二つとデータテーブル/データアセットを使うのが良いかなと思います

UI周りのことを覚えたいのであればEpicGamesが打ち出しているUMGラーニングをおススメします

> **[Your First Hour in UMG | Course](https://dev.epicgames.com/community/learning/courses/l3p/your-first-hour-in-umg/6o5/introduction?sessionInvalidated=true)**
>
> In this course, you’ll learn how to create basic user interfaces for the user using the Unreal Motion Graphics (UMG) UI Designer.

5.0のチュートリアルは[こちら](https://docs.unrealengine.com/5.0/ja/tutorials-for-umg-ui-designer-for-unreal-engine/)

5.0のドキュメント  
[UMG レイアウトおよびビジュアル デザイン](https://docs.unrealengine.com/5.0/ja/visual-design-and-layout-tools-for-umg-in-unreal-engine/)  
[UMG でのプログラミングとスクリプティング](https://docs.unrealengine.com/5.0/ja/programming-and-scripting-with-umg-in-unreal-engine/)

5.3にアップデート済みなら、ドキュメントが配置変更されているので以下を参照  
[ユーザー インターフェースを作成する](https://docs.unrealengine.com/5.3/ja/creating-user-interfaces-with-umg-and-slate-in-unreal-engine/)  
[UMG エディタ リファレンス](https://docs.unrealengine.com/5.3/ja/umg-editor-reference-for-unreal-engine/)

[ウィジェットからGameInstanceにアクセスするには](https://forums.unrealengine.com/t/access-game-instance-from-object-class/1268123)
