There's been an error

严重: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.IllegalStateException: Scene graph is not properly updated for rendering.
State was changed after rootNode.updateGeometricState() call. 
Make sure you do not modify the scene from another thread!
Problem spatial name: Root Node
	at com.jme3.scene.Spatial.checkCulling(
	at com.jme3.renderer.RenderManager.renderSubScene(
	at com.jme3.renderer.RenderManager.renderScene(
	at com.jme3.renderer.RenderManager.renderViewPort(
	at com.jme3.renderer.RenderManager.render(
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(
	at java.base/

I don’t know why this error occurs, but I’d like to know what I can do to prevent it from happening :thinking: :thinking: :thinking: :thinking:

The most likely reason is, you attached or detached a spatial in another than the JME3 Main Thread. For this, you can enqueue Runnables or Callables by SimpleApplication#enqueue(). They get executed at the begin of the main loop.

1 Like

^ don’t do it. With multithreading you need to use Application.enqueue() to apply your changes to the scene graph.

1 Like

Thank you for your reply.

Thank you for your reply. :grey_exclamation: