スキル一覧に戻る
s4k10503

view-implementation

by s4k10503

Unityによるアバターシステムクライアント

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


View Implementation

Execution Mode

2フェーズ実行: 調査と実装を分離し、メインコンテキストを節約。

Phase 1: 調査(Exploreサブエージェント)

複数ファイルの探索が必要な場合、サブエージェントで実行:

runSubagent(
  description: "View実装パターン調査",
  prompt: """
以下の調査を実行し、結果をサマリーで返してください:

1. 既存View実装パターン確認:
   - Features/*/Presentation/View/ および Shared/Presentation/View/ 配下の構造を把握
   - 同様のコンポーネントがあればその実装を参照

2. BEM命名規則確認:
   - docs/Spec/bem-naming-conventions.md を読んでルール把握

3. 対象画面の要件:
   - 画面名: [対象画面]
   - 必要なSection・モーダルの有無

## 返却フォーマット
- 推奨実装パターン(参考ファイルパス付き)
- Orchestrator使用要否
- BEMクラス名提案
"""
)

Phase 2: 実装(メイン)

調査結果に基づき、メインコンテキストで実装。

References

View実装の詳細は以下のドキュメントを参照:

既存実装の参考:Features/*/Presentation/View/, Shared/Presentation/View/

Decision Flow

Orchestrator使用判断:

  • ✅ 必要: 複数Section、Section間通信、複雑な初期化順序
  • ❌ 不要: シンプルなページ、Section不使用

Key Patterns

// BEM規約に基づく検索(推奨)
var button = UIElementUtils.QueryByBEM<Button>(
    root, block: "page-name", element: "button", modifier: "primary", context: this);

// 状態切り替え
UIElementUtils.UpdateTabSelection(tabs, selectedIndex, selectedClass: "tab--selected");

Checklist

  • PageはObservableを公開、Presenterへの逆参照なし
  • SectionはPageSectionBase継承、EnsureElements()パターン使用
  • 購読はCompositeDisposableで管理
  • OnEnable時にrootVisualElement再取得

新Feature追加時のView構成

新しいFeature(例: Features/Shop/)を追加する場合:

1. フォルダ構成

Features/{FeatureName}/
└── Presentation/
    ├── Presenter/
    │   ├── {FeatureName}Presenter.cs
    │   └── {FeatureName}EventHandler.cs
    └── View/
        └── {FeatureName}SystemPage/
            ├── {FeatureName}SystemPage.cs
            ├── {FeatureName}SystemPage.uxml
            ├── {FeatureName}SystemPage.uss
            └── Sections/
                ├── {FeatureName}ReactiveContext.cs
                └── {Section}Section.cs

2. asmdef作成

Feature用のasmdefを作成:

  • Features.{FeatureName}.asmdef
  • Dependencies: Shared.Core, Shared.Infrastructure, Shared.Presentation

3. 既存Feature参照

構成パターンを確認: Features/Avatar/, Features/Room/

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です