Visitar URL original
Fix drag and drop parent falling back to selected entity for drop models by adjetey0 · Pull Request #2420 · playcanvas/editor · GitHub
Skip to content

Fix drag and drop parent falling back to selected entity for drop models - #2420

Open
adjetey0 wants to merge 2 commits into
playcanvas:mainfrom
adjetey0:fix-drag-and-drop-root
Open

adjetey0 wants to merge 2 commits into
playcanvas:mainfrom
adjetey0:fix-drag-and-drop-root

Conversation

@adjetey0

@adjetey0 adjetey0 commented Oct 21, 2026 •

Copy link
Copy Markdown

Fixes #257

What's Changed

Updated viewport drop logic for models, templates, and sprites to attach to the scene root instead of the currently selected entity.

Checks

@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@adjetey0 is attempting to deploy a commit to the playcanvas Team on Vercel.

A member of the Team first needs to authorize it.

@Maksims

Maksims commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

That is very drastic change to UX, and we definitely would not want this to be merged, as pre-selecting parent entity - is a conscious decision by user.
If you want for entity to be created under root, you either select root or drop onto root entity in hierarchy. Taking away current ability to drop into selected entity - would be a UX downgrade, and lead to a constant need to re-parent entities after dropping - very inconvenient.

This would be very annoying and inconvenient especially on larger scenes with many entities.

@adjetey0

adjetey0 commented Oct 21, 2026 via email

Copy link
Copy Markdown
Author

@Maksims

Maksims commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

There is another option: if particular behavior is very split, close to 50/50 or even 70/30, and is very common action, then it is worth considering a settings toggle, where default value should follow existing UX, but provide users ability to change such behavior.

The challenging part - is to figure out if it is significant part of users that would switch to such behavior, as discovering some settings toggles - is almost never done by users.

@adjetey0

Copy link
Copy Markdown
Author

A settings toggle is a great compromise! I completely understand the concern about discoverability, but it gives power users the option without breaking the default UX. If you are open to it, I would love to take a stab at implementing that toggle. Could you point me to the file where editor settings/preferences are typically added?

@Maksims

Maksims commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Also, if you select template before dragging it into the scene, it will be created under the root by default. Which is an easy to muscle memory.

This branch has not been deployed

No deployments
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.

Drag & drop models / templates from asset to scene should add them to scene root

2 participants