Skip to content

revert(player): remove instance nesting depth guard#201

Merged
MasamiYitsuse merged 1 commit into
developfrom
feature/remove-instance-depth-guard
Jun 23, 2026
Merged

revert(player): remove instance nesting depth guard#201
MasamiYitsuse merged 1 commit into
developfrom
feature/remove-instance-depth-guard

Conversation

@MasamiYitsuse

Copy link
Copy Markdown
Collaborator

概要

Instanceパーツのネスト深さガード(MAX_INSTANCE_DEPTH = 16、commit 9e6d469 で導入)を削除します。

理由

レビュワー判断により、循環参照(A → B → A)は SpriteStudio 側のオーサリングミス=データの作り方の問題であって、プレーヤ側でガードして黙って一部を未描画にすべきものではない、との整理です。よってプレーヤは Instance ネスト深さの上限を設けません。

変更内容

  • _instance_depth メンバ / MAX_INSTANCE_DEPTH 定数を削除
  • setInstanceDepth / getInstanceDepth アクセサを削除
  • _setup_instance_children 内の深さチェック(警告+スキップ)と子への深さ伝播を削除
  • 関連コメントを現状に整合

Unity 版の MaxInstanceDepth とは意図的に非パリティになります。
9e6d469 で同時に入った audio シグナルは無関係な機能のため保持しています。

影響

正常データには影響なし。循環参照を含む不正データはロード時の再帰で破綻し得ますが、これは想定挙動(データ不正として明確に破綻させる方針)です。

Drop the MAX_INSTANCE_DEPTH (16) cyclic/runaway-nesting guard added in
9e6d469. Per review, a cyclic Instance reference (A -> B -> A) is an
authoring mistake in the data, not something the player should guard
against, so the player no longer caps Instance nesting depth.

Removes `_instance_depth`, `MAX_INSTANCE_DEPTH`, the
setInstanceDepth/getInstanceDepth accessors, the depth check and the
warning skip in `_setup_instance_children`, and the child depth
propagation. Intentionally diverges from the Unity player's
MaxInstanceDepth. The audio signal from 9e6d469 is unrelated and kept.
@MasamiYitsuse MasamiYitsuse merged commit d417115 into develop Jun 23, 2026
0 of 2 checks passed
@MasamiYitsuse MasamiYitsuse deleted the feature/remove-instance-depth-guard branch June 23, 2026 07:01
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.

1 participant