defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Child a collection to a game object #343

Open Malmer opened 7 years ago

Malmer commented 7 years ago

(Yes, I know this horse has already been severely beaten to death, but I bumped into this issue again today, and the most basic version of this shouldn't be much work to implement [just being able to child to a game object, no nested collections of collections], and I really can't think of any feature that is more fundamental to the engine, but isn't there)

Expected behaviour

Dragging a collection to a game object should child it

Actual behaviour

Action not allowed in editor, but can be done in script code via set_parent message.


Defold version1.2.96
Defold shaf6271550bf9fdbe0bd959dce1af41dcbbf908ffb
OS nameMac OS X
OS version10.12.2
OS archx86_64
Java version1.8.0_102-b14
sicher commented 7 years ago

How should this work? When you child with set_parent in script you need to child each go by itself or a hierarchy starting with a root GO. When dragging a collection, should then editor "dissolve" the collection and child each go separately, or are you talking about a new concept of being able to place collections anywhere in the scene graph?

Malmer commented 7 years ago

Everything that is in the root of the collection should be parented to the game object you child the collection to. Nothing more fancy than that. It is what you expect will happen when you do that type of operation.

sicher commented 7 years ago

Just to clarify: the operation you suggest is equivalent to marking all GOs in a collection, press ctrl-c, then marking a target parent GO and pressing ctrl-v?

Malmer commented 7 years ago

No. It is more like this:

Rather than currently only being able to do this:

  • Collection
    • Subcollection1
    • Subcollection2
    • Go1
    • Go2
    • Go3

Be able to do this:

  • Collection
    • Go1
    • Subcollection1
    • Go2
    • Go3
      • Subcollection2