revert(player): remove instance nesting depth guard#201
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
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シグナルは無関係な機能のため保持しています。影響
正常データには影響なし。循環参照を含む不正データはロード時の再帰で破綻し得ますが、これは想定挙動(データ不正として明確に破綻させる方針)です。