editor icon indicating copy to clipboard operation
editor copied to clipboard

Additonal ways to sort scripts loading order

Open LeXXik opened this issue 4 years ago • 3 comments

With the new feature that allows to copy-paste the entire framework, a project may quickly gain a lot of scripts. Adjusting the script loading order is hard, given that the only way to do so is by dragging it: image

Please, consider adding some other way to quickly change the order of a script, or even groups of scripts.

LeXXik avatar Apr 01 '21 12:04 LeXXik

Multi-select could be an option for this. It would work with similar UX as in tree-view, with Shift and Ctrl buttons. If selection is not sequential (items have non-selected items in between), then after a drag it would combine them in order, here is an example:

  1. Item 1
  2. Selected 2
  3. Item 3
  4. Selected 4
  5. Item 5

If you drag selected items above Item 1, then you'll end up with this order:

  1. Selected 2
  2. Selected 4
  3. Item 1
  4. Item 3
  5. Item 5

This would allow selecting different combinations, not only in order using Shift + Click, but also Ctrl + Click.

Maksims avatar Apr 01 '21 21:04 Maksims

Thinking out loud here. Another option is to use a tree view instead, similar to the scene graph, where a tree could be only one level deep, but would allow to group scripts, move groups by dragging parent, etc.

LeXXik avatar Apr 01 '21 22:04 LeXXik

Linking https://github.com/playcanvas/editor/issues/4

LeXXik avatar Sep 13 '23 10:09 LeXXik