AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 290 forks source link

Sort GameObjects in TreeViewList (Scene View) #375

Open ChristianGreiner opened 8 years ago

ChristianGreiner commented 8 years ago

It would be nice if you can sort / move Root-GameObjects in the Scene View.

At the moment, this feature is not possible: alt tag

With this feature you could organize / structure your gameobjects in the scene-view much better.

ilexp commented 8 years ago

Since the order in which objects are stored and updated in Duality is an implementation detail and (by design) no guarantees between GameObjects are provided, this isn't easily possible. In other words, there is no way to access or change object ordering it. Allowing this in the editor would require some kind of additional editor-only data layer and potentially do more harm than good, since it wouldn't be clear to users whether the ordering of objects does anything logic-wise.

Instead, objects can be organized hierarchically using empty GameObjects as "folders". In the above case, you could for example create an "Enemies" object and put all enemies in there.

Leaving this open for discussion, but am currently not in favor of implementing this.

PS: The animated gif does an excellent job at describing the issue, thumbs up for that :smile:

ChristianGreiner commented 8 years ago

I mean this feature is only to be nice to look at and shouldn't have any logical influence of the gameobjects.

PS: The animated gif does an excellent job at describing the issue, thumbs up for that

gracias :)