fix: banned users cannot teleport after second attempt#8868
fix: banned users cannot teleport after second attempt#8868sandrade-dcl wants to merge 2 commits into
Conversation
- Added a check in `UpdateLoadingState` to return early for entities with `BannedSceneComponent`.
|
Windows and Mac build successful in Unity Cloud! You can find a link to the downloadable artifact below. |
This comment has been minimized.
This comment has been minimized.
|
Claude finished @sandrade-dcl's task in 1m 19s —— View job Review
Root-cause checkProblem: After Assessment: ✅ Fixes the actual cause. The guard is placed at exactly the right point — where the orphan promise originates — and is symmetric with the consumer's existing exclusion. The unban path is unaffected: once Previous blocking issue — resolvedThe first commit referenced // Promises for banned-scene entities are not consumed downstream; issuing one here would leak its SceneFacade.This satisfies the CLAUDE.md rule: the comment now states the non-obvious invariant (why the guard exists) without naming any specific caller. No remaining blocking issues. REVIEW_RESULT: PASS ✅ |
|
🔍 Claude reviewed this PR and found no blocking issues, but assessed it as complex — human DEV review is still required before merging. |
|
PR #8868, run #26454320267 Builds: Windows change, Windows baseline, macOS change, macOS baseline Framework 13 i7
|
Pull Request Description
Fix #7505
What does this PR change?
An item with the same key has already been added. Key: SceneCommunicationPipe+SubscriberKeyin builds, orCannot add the same SystemGroupWorld twicein editor, and all further teleports stopped working.ECSBannedScene.TrySetCurrentSceneAsBannedAsyncdisposed the banned scene it resetSceneLoadingStatetoUNINITIALIZED/PromiseCreated=falseso the scene could load again once the ban was lifted, but leftBannedSceneComponenton the entity. On the next frameResolveSceneStateByIncreasingRadiusSystem.UpdateLoadingStatedid not filter byBannedSceneComponentand issued a freshAssetPromise<ISceneFacade>.LoadSceneSystemresolved it into a newSceneFacade(registering it inSystemGroupSnapshot), butControlSceneUpdateLoopSystem.HandleNotCreatedScenesdoes filter byBannedSceneComponentso the promise was never consumed and theSceneFacadeleaked along with itsSystemGroupWorldregistration. Re-entering the scene later created a secondSceneFacadewith the same registration key and collided with the orphan.UpdateLoadingStatefor entities that carryBannedSceneComponent, matching the semantics already used byHandleNotCreatedScenes. The orphan promise (and therefore the orphanSceneFacade) is never created, and the unban path is unaffected — onceBannedSceneComponentis removed the entity flows throughUpdateLoadingStateas before.Test Steps
SystemGroupWorld twiceexception in editor.Code Review Reference
Please review our Branch & PR Standards before submitting. It explains the automated review flow, QA/DEV approval requirements, and what each label does — especially useful for first-time contributors.