External Publication
Visit Post

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

jMonkeyEngine Hub February 8, 2026
Source
I port my 2D-game in 3D using JME3. I used Tiled for maps creation before but in 3D I need to use JME-SceneComposer. I added many objects on the scene and I thought - JME3 must attach to every object a unique ID. Tiled did so. But I didn’t find the field with unique ID in SceneComposer. A user of Tiled has no ability to change this unique ID to avoid breaking of the game scripts or have duplicating IDs. Even if the user copies an object from one map to an another - the copied object receives a new unique ID to avoid duplication. Scripts in my game find elements of the game world using this unique IDs. For example: A map has a lever and a door with id 888. The lever has a field with name - “AffectedObjectId” with type int. I enter in this field the ID of the affected door (888). The core of my game tries to find on the map the object with ID 888 and subscribes the object on the event: LeverPulledEvent. My question - how should I receive the unique IDs of the scene elements? Or there are other best practices in 3D game dev?

Discussion in the ATmosphere

Loading comments...