I have been silently using the JME for about a year now and I’m pretty new to multi-threaded programming, but now that I’m working on an application involving networking there is no way around this issue.
I encountered some problems in attaching/detaching spatials from an app-state that does some networking tasks, but I think I’m on a path to fix this using the information found here:
Now my question is this:
Do I have to enqueue spatial attachement using a Callable on every single child attachment, even if the parent node is not yet attached to the main root node?
Imagine this spatial structure:
I was wondering if it is sufficient to just enqueue the attaching of myNode to the rootNode in a multi-threaded way and just use .attachChild() as usual for all of the sub spatials? From my understanding this would make sense, because as long as there is no recursive connection of a spatial to the applications rootNode, modifying this spatial would not lead to a modification of the main scene graph.
Furthermore if this is correct, does it apply to other modifications too, like translating spatials, or changing materials of geometries, etc.? Do I have to use Callables for this stuff too?
Thanks in advance!