LayerAttachPoint Saving/Loading order

2 views
Skip to first unread message

Julien Ryard (ENSAM)

unread,
Nov 13, 2012, 8:27:28 AM11/13/12
to dtenti...@googlegroups.com
Hello.

I have a little problem with my entities declared with LayerAttachPoint component.

Sometimes I have two entities :
E1 with a layer fixed to default root node.
a PAT component
and a layerAttachPoint component

and E2 with a layer, fixed to E1 layerAttachPoint component
A PAT component
and a staticMesh.

Sometimes whe I save my scene, E1 is saved first, but sometimes it is in second.
But when E1 is loaded after E2, E2 couldn't be added to my scene, cause the node define by E1 layerAttachPoint isn't created yet.

Maybe could we add a priority for saving entity with layerAttachPoint component first.
Maybe it's in loading, when an entity link to a layeAttachPoint not yet created, we could push it on a stack of entity to load later.
Maybe we could done two pass to load entities, one from first to last, and the other from last to first, avoiding entities already loaded.

I solved the problem by my side, by editing my map files, but it is very simple scene, I think it should be better if it was automatic.

Julien.

Martin Scheffler

unread,
Nov 14, 2012, 4:07:18 AM11/14/12
to dtenti...@googlegroups.com

Hi Julien,
this sounds more like a bug in the layer system. The order in which components are loaded should not matter. Unfortunately this makes the layer / layerattachpoint system the most complicated part of dtentity. I will try to find time tomorrow for investigating. Thank you for reporting!
Cheers,
Martin

Martin Scheffler

unread,
Nov 19, 2012, 2:06:26 AM11/19/12
to dtenti...@googlegroups.com
Hi Julien,
I just comitted some changes to trunk that may fix the bug. Can you please test?
Some day I will have to completely rewrite layer / layerattachpoint systems, but hopefully this will do the trick in the meantime.
Cheers,
Martin


2012/11/14 Martin Scheffler <martins...@gmail.com>

Julien Ryard (ENSAM)

unread,
Nov 19, 2012, 8:21:37 AM11/19/12
to dtenti...@googlegroups.com
Hi.

Thank you for this patch.
I have to change some things with the removiving of applicationComponent, and I will try as soon as possible.

Julien.

Julien Ryard (ENSAM)

unread,
Nov 19, 2012, 11:11:39 AM11/19/12
to dtenti...@googlegroups.com
I do some test in the editor and in my application, I modify my scene with the editor and directely with in xml file, and it works well now.

Thank you.
Reply all
Reply to author
Forward
0 new messages