Skip to content

Conversation

@shairo
Copy link
Contributor

@shairo shairo commented Sep 16, 2025

AAS側で保存されているAssetGroup並び順をLayoutRuleEditorにも反映します。

動作確認

AddressableAssetGroupSortSettingsが追加される境界バージョンで動作確認しました

  • 1.22.3 (ない)
  • 1.23.1 (ある)
  • 2.3.1 (ない)
  • 2.3.7 (ある)
  • 2.6.0 (6000.0最新)

@shairo shairo requested review from Haruma-K and qua-iy September 16, 2025 03:20
Copy link
Member

@Haruma-K Haruma-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Layout Viewerの方も対応が必要そうかも?
  • 優先度は低いですが、Layout Rule Editor を開いた状態でソート順を変更した時に、その変更を Layout Rule Editor に反映させる対応はできそうでしょうか
    • Hackyな感じになるならやらなくてもいいかなと思いつつ

Copy link

@qua-iy qua-iy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

自分の観点としてはapproveしますが、SmartAddresserの影響範囲という観点で @Haruma-K さんのレビュー部分を見ていただければと

@shairo
Copy link
Contributor Author

shairo commented Sep 19, 2025

@Haruma-K

Layout Rule Editor を開いた状態でソート順を変更した時に、その変更を Layout Rule Editor に反映させる対応

これはすでに出来てる・・と思ったけど、初回だけ反映されないケースがあるみたいでした。
というのもsortOrderの更新はAddressableAssetSettings.OnModificationの先で行われているので、LayoutRuleEditorの更新処理と登録順が前後するとうまくいきません(どっちのWindowのOnEnableが先に呼ばれるか次第)

ただLayoutRuleEditorは更新のたびにのOnModificationコールバックを登録しなおしているので、2回目以降は登録順が後ろになってうまくいくようです。
(LayoutViewerの追加分もおなじようにしました)

回避するとしたら・・・ModificationEvent.GroupMovedイベントだったらEditorApplication.delayCallで遅延更新するとかでしょうか? やってみます? やってみました

@shairo shairo requested a review from Haruma-K September 24, 2025 02:37
Copy link
Member

@Haruma-K Haruma-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一点コメントしましたが、それ以外は問題ないのでApproveします

return;
}

var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こちらも
#if AAS_SORT_ORDER
が必要そうでしょうか?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

失礼しました!#ifを追加して、sortOrderのないバージョンでエラーにならないことを再確認しました
こちらでマージしますね

@shairo shairo merged commit 5e8db1f into main Sep 24, 2025
1 check passed
@shairo shairo deleted the feature/apply-sortorder branch September 24, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants