For AI agents: the complete documentation index is available at /AchEngine/ja/llms.txt, the full documentation bundle is available at /AchEngine/ja/llms-full.txt, and this page is available as Markdown at /AchEngine/ja/usage/integration.md.

モジュール連携

DI、Table Loader、Localization、Addressables、UI を組み合わせる基本パターンです。

Table と Localization

テーブルには翻訳済み文字列ではなくキーを保存します。

| Id  | NameKey         | DescKey         | Price |
|-----|-----------------|-----------------|-------|
| 101 | item.sword.name | item.sword.desc | 500   |
var item = TableManager.Get<ItemTable>().Get(itemId);
_nameText.text = LocalizationManager.Get(item.NameKey);
_descText.text = LocalizationManager.Get(item.DescKey);

Table と Addressables

IconAddress と SfxAddress をテーブルで管理し、ロードしたアセットは View の終了時に解放します。

_iconImage.sprite = await AddressableManager.LoadAsync<Sprite>(item.IconAddress);
AddressableManager.Release(item.IconAddress);

DI サービス層

静的マネージャーをインターフェースでラップするとテストしやすくなります。ITableService、ILocalizationService、IItemService を GlobalInstaller に登録し、View へ注入します。

関連ドキュメント