defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Properties of nested collection's game object instances not saved in parent #1642

Open mdm373 opened 6 years ago

mdm373 commented 6 years ago

When editing the scene collection and moving an individual "spawn-door", the door appears at the updated position in the editor and the position property of the instance has an "undo" symbol. But, when I play the scene the door appears at its original location and the JSON for the "lobby-scene" does not appear to update for the moved "spawn-door" instance. Restarting the editor also returns the door to its unmodified position

"lobby-scene" with unmodified spawn-door image

"lobby-scene" with instance modified spawn door image

"lobby-scene" at runtime showing no modification image

"lobby-scene" generated json, showing no instance changes name: "default" instances { id: "score-manager" prototype: "/main/lobby-scene/score-manager/score-manager.go" position { x: 0.0 y: 0.0 z: 0.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } } instances { id: "lobby-scene" prototype: "/main/lobby-scene/lobby-scene.go" position { x: 0.0 y: 0.0 z: 0.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } } collection_instances { id: "player-character" collection: "/main/lobby-scene/character/player-character/player-character.collection" position { x: 355.0 y: 538.0 z: 0.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } } collection_instances { id: "terrain" collection: "/main/lobby-scene/terrain/terrain.collection" position { x: 0.0 y: 0.0 z: 0.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } } collection_instances { id: "spawners" collection: "/main/lobby-scene/spawners/spawners.collection" position { x: 0.0 y: 0.0 z: 0.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } } scale_along_z: 0

erikangelin-king commented 6 years ago

Part bug, part feature request. The editor accidentally allows you to change the properties and respects them in the scene view, but it's not saved, nor part of the build data nor actually supported by the engine. But it would be a nice feature :)

mdm373 commented 6 years ago

Sad to hear it but thanks for the clarification that its not supported by the engine. I just started playing with Defold and the game object file / collection file structure is such a great feature compared to Unity's limited prefab options. Maybe I'm over-complicating things with this approach thou...