External Publication
Visit Post

Does JME3 attach a unique ID to every element of a scene?

jMonkeyEngine Hub February 9, 2026
Source
I never worked with the SceneComposer, but at the top of my mind are two solutions for your mapping: (1) Use the name field as unique identifier, with the drawback of keeping a record of all the names and potential performance issues searching for objects when you have a larger number of objects. (2) Add a ‘GameEnity’ control (extend AbstractControl) holding a unique ID. You can set the ID field in the SceneComposer. When you start the game you read these controls into a registry and validate (duplicate). Then in your script you call the registry for the ID and get the correct object very quick (without searching via name). I hope this helps.

Discussion in the ATmosphere

Loading comments...