Editor - Reorder elements in the outline bug? (SOLVED)

EDIT: not a bug.
Turns out you can only re-order nodes within GUI collections.

Describe the bug (REQUIRED)
I cannot reorder assets, objects or components in the editor (I can use drag&drop parenting, just not reorder them). I’ve read in the docs and a couple other posts that you do this by pressing ALT+arrows, and I swear, I’m trying to do that XD it just doesn’t work.

To Reproduce (REQUIRED)
Steps to reproduce the behavior:

  1. Go to ‘Defold editor’
  2. Click on ‘any asset, object, component…’
  3. Press ALT+UP or DOWN
  4. See error (nothing happens)

Expected behaviour (REQUIRED)
Said element to move up or down in the list.

Defold version (REQUIRED):

  • Version 1.2.169

Platforms (REQUIRED):

  • Platform: Windows 10 pro

Do you mean that you can’t reorder the assets on the left side of the editor L, where the files appear, or the right properties pane side?

I can’t reorder the assets on the left side, yeah, and can’t reorder objects, components on the right outline either. I haven’t tried with properties, they don’t seem to be intended to be re-ordered.

Thanks for replying so fast by the way.

The left side of the defold editor, where your files are stored is sorted alphabetically, so that is why you cant reorder them. Reordering only works if you are inside a gui scenes and try to reorder the nodes, or inside a collection and try to reorder gameobjects.
And sorry I meant the outline pane when I said "the right properties pane " :grinning:

1 Like

Ok, I didn’t know you couldn’t reorder assets (its kind of common in other game editors, and it can be useful). I tried reordering nodes inside a GUI and it did actually work! But when i do the same with objects inside a collection, nothing happens. :sweat_smile:

:thinking: I’ve never heard of arbitrarily reordering files in a file browser, but I can see how that could be nice. (And how it could cause complete chaos…)

With GUI nodes, the order in the outline controls the draw order, that’s why you can move them. Maybe this could be clarified in the documentation.

Game object draw order is controlled by their Z position, so there’s no in-engine reason to reorder them. It could be a feature request to allow this though. The objects can be listed in an arbitrary order in the collection file, but the editor alphabetizes them before displaying.

It is mentioned here: https://defold.com/manuals/gui/#draw-order (but that is quite far down on the page). Perhaps it should be mentioned elsewhere?

1 Like

It might not have a real effect on the game, but there is a reason to re-order game objects: exactly what the name says XD, for clarity and organization purposes. Or maybe i’ve got some bad habits from gamemaker.
Lets get to the point though.

You can only re-order gui nodes, not game objects? Answers in other posts made me think you could.:sweat_smile:

Yes, exactly.

If you need to organize things more, possibly putting your game objects into different collections would help, and your files into separate folders.


@britzl Well that seems pretty clear to me. I don’t see how that by itself would cause any misunderstanding.

2 Likes

Ok thanks.

If you need to organize things more, possibly putting your game objects into different collections would help, and your files into separate folders.

Thats what I thought would be the way to go if I really needed to have things perfectly classified.