Skip to content

Fix cleanup for scripts with explicit scriptName - #345

Open
ice1080 wants to merge 1 commit into
playcanvas:mainfrom
ice1080:fix/script-name-cleanup
Open

Fix cleanup for scripts with explicit scriptName#345
ice1080 wants to merge 1 commit into
playcanvas:mainfrom
ice1080:fix/script-name-cleanup

Conversation

@ice1080

@ice1080 ice1080 commented Sep 10, 2026

Copy link
Copy Markdown

Use the constructor’s explicit scriptName during cleanup, retaining the class-name fallback.

Add regression coverage for _OrbitCamera with scriptName = 'orbitCamera': unmount removes the script and remount succeeds without duplicate warnings. Also cover fallback cleanup and include a patch changeset.

Fixes #343.

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 82657da

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@playcanvas/react Patch
@playcanvas/blocks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ice1080
ice1080 force-pushed the fix/script-name-cleanup branch from 2d81ff9 to 82657da Compare September 11, 2026 00:09
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.

Script cleanup uses the class name instead of the registered scriptName

1 participant